Index: tmp/org.txm.statsengine.r.core/plugin.xml
===================================================================
--- tmp/org.txm.statsengine.r.core/plugin.xml	(revision 1954)
+++ tmp/org.txm.statsengine.r.core/plugin.xml	(revision 1955)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.4"?>
 <plugin>
+   <extension-point id="org.txm.statengine.r.core.RTransformer" name="org.txm.statengine.r.core.RTransformer" schema="schema/org.txm.statengine.r.core.RTransformer.exsd"/>
    <extension
          point="org.eclipse.core.runtime.preferences">
       <initializer
Index: tmp/org.txm.statsengine.r.core/schema/org.txm.statengine.r.core.RTransformer.exsd
===================================================================
--- tmp/org.txm.statsengine.r.core/schema/org.txm.statengine.r.core.RTransformer.exsd	(revision 0)
+++ tmp/org.txm.statsengine.r.core/schema/org.txm.statengine.r.core.RTransformer.exsd	(revision 1955)
@@ -0,0 +1,112 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.txm.statsengine.r.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.txm.statsengine.r.core" id="org.txm.statengine.r.core.RTransformer" name="org.txm.statengine.r.core.RTransformer"/>
+      </appinfo>
+      <documentation>
+         A transformer allow to import data in the RWorkspace or to export a R data to a TXM object
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <choice minOccurs="1" maxOccurs="unbounded">
+            <element ref="transformer"/>
+         </choice>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="transformer">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn="org.txm.statsengine.r.core.RTransformer"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="type" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The TXMResult managed by the transformer
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn="org.txm.core.results.TXMResult:"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>

Property changes on: tmp/org.txm.statsengine.r.core/schema/org.txm.statengine.r.core.RTransformer.exsd
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RTransformer.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RTransformer.java	(revision 0)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RTransformer.java	(revision 1955)
@@ -0,0 +1,32 @@
+package org.txm.statsengine.r.core;
+
+import org.txm.core.results.TXMResult;
+import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
+
+/**
+ * a RTransformer allows to transfert data from TXM/R to R/TXM
+ * 
+ * RTransformer are registered in the RStatengine and used by the SendToR command
+ * 
+ * @author mdecorde
+ *
+ * @param <T>
+ */
+public abstract class RTransformer<T extends TXMResult> {
+	
+	/**
+	 * 
+	 * @param symbol the R symbol pointing to the R variable to transfert in TXM (Java part)
+	 * @return the resulting TXMResult
+	 * @throws RWorkspaceException
+	 */
+	public abstract T fromRtoTXM(String symbol) throws RWorkspaceException;
+	
+	/**
+	 * 
+	 * @param o the result to tranfert in R
+	 * @return the created R variable symbol
+	 * @throws RWorkspaceException
+	 */
+	public abstract String fromTXMtoR(TXMResult o) throws RWorkspaceException;
+}

Property changes on: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RTransformer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RStatsEngine.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RStatsEngine.java	(revision 1954)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RStatsEngine.java	(revision 1955)
@@ -1,6 +1,12 @@
 package org.txm.statsengine.r.core;
 
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.txm.core.messages.TXMCoreMessages;
+import org.txm.core.results.TXMResult;
 import org.txm.statsengine.core.StatsEngine;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 import org.txm.statsengine.r.core.messages.RCoreMessages;
@@ -78,6 +84,8 @@
 			RWorkspace.setUseFileCommunication(RPreferences.getInstance().getBoolean(RPreferences.FILE_TRANSFERT));
 			//	System.out.println("success");
 			//System.out.println("file transfert ? "+RWorkspace.isFileTranfert());
+			
+			loadRTransformers();
 		} catch (RWorkspaceException e) {
 			Log.severe(RCoreMessages.error_connectionFailed); 
 			started = false;
@@ -86,12 +94,38 @@
 		return started;
 	}
 
-	
+	public HashMap<String, RTransformer<? extends TXMResult>> getTransformers() {
+		return transformers;
+	}
 
+	HashMap<String, RTransformer<? extends TXMResult>> transformers = new HashMap<String, RTransformer<? extends TXMResult>>();
+	private void loadRTransformers() {
+		
+		transformers.clear();
+		IConfigurationElement[] contributions = RegistryFactory.getRegistry().getConfigurationElementsFor(RTransformer.class.getName());
 
+		Log.finest(TXMCoreMessages.bind("Looking for R transformers contributions with extension point id {1}...", RTransformer.class.getName())); //$NON-NLS-1$
+		Log.finest(TXMCoreMessages.bind("{0} transformers(s) found.", contributions.length)); //$NON-NLS-1$
+
+		for (int i = 0; i < contributions.length; i++) {
+			try {
+				@SuppressWarnings("unchecked")
+				RTransformer<? extends TXMResult> transformer = (RTransformer<? extends TXMResult>) contributions[i].createExecutableExtension("class"); //$NON-NLS-1$
+
+				Log.fine(TXMCoreMessages.bind("Registering R transformer: {0}...", transformer));
+
+				transformers.put(contributions[i].getAttribute("type"), transformer);
+			} catch (Exception e) {
+				Log.severe("Error: failed to instantiate " + contributions[i].getName() + ".");
+				e.printStackTrace();
+			}
+		}
+	}
+
 	@Override
 	public boolean stop() {
 		try {
+			transformers.clear();
 			RWorkspace.shutdown();
 			RStatsEngine.kill();
 			started = false;
@@ -218,5 +252,4 @@
 	public String getName() {
 		return "R";
 	}
-	
 }
