Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java	(revision 508)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/ImportPreferencePage.java	(revision 509)
@@ -48,6 +48,7 @@
 import org.txm.rcp.Application;
 import org.txm.rcp.Messages;
 import org.txm.rcp.TxmPreferences;
+import org.txm.searchengine.cqp.CQPPreferences;
 // TODO: Auto-generated Javadoc
 /**
  * The Class ExportPreferencePage.
@@ -146,7 +147,7 @@
 		l.setLayoutData(ldata);
 		addField(defaultlang);
 		
-		empty_code = new StringFieldEditor(TBXPreferences.CQP_EMPTY_VALUE_CODE, "Empty property value code", getFieldEditorParent());
+		empty_code = new StringFieldEditor(CQPPreferences.CQP_EMPTY_VALUE_CODE, "Empty property value code", getFieldEditorParent());
 		addField(empty_code);
 		
 	}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferencePage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferencePage.java	(revision 508)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/CQPPreferencePage.java	(revision 509)
@@ -45,6 +45,7 @@
 import org.txm.core.preferences.TBXPreferences;
 import org.txm.rcp.Application;
 import org.txm.rcp.Messages;
+import org.txm.searchengine.cqp.CQPPreferences;
 // TODO: Auto-generated Javadoc
 /**
  * This class represents a preference page that is contributed to the
@@ -105,39 +106,39 @@
 	@Override
 	public void createFieldEditors() {
 
-		cqi_use_network = new BooleanFieldEditor(TBXPreferences.CQI_NETWORK_MODE,
+		cqi_use_network = new BooleanFieldEditor(CQPPreferences.CQI_NETWORK_MODE,
 				Messages.CQPPreferencePage_1,
 				BooleanFieldEditor.DEFAULT, getFieldEditorParent());
 		cqi_server_path_to_cqplib = new DirectoryFieldEditor(
-				TBXPreferences.CQI_SERVER_PATH_TO_CQPLIB, Messages.CQPPreferencePage_0,
+				CQPPreferences.CQI_SERVER_PATH_TO_CQPLIB, Messages.CQPPreferencePage_0,
 				getFieldEditorParent());
-		cqi_server_is_remote = new BooleanFieldEditor(TBXPreferences.CQI_SERVER_IS_REMOTE,
+		cqi_server_is_remote = new BooleanFieldEditor(CQPPreferences.CQI_SERVER_IS_REMOTE,
 				Messages.CQPPreferencePage_10,
 				BooleanFieldEditor.DEFAULT, getFieldEditorParent());
-		cqi_server_host = new StringFieldEditor(TBXPreferences.CQI_SERVER_HOST,
+		cqi_server_host = new StringFieldEditor(CQPPreferences.CQI_SERVER_HOST,
 				Messages.CQPPreferencePage_11, getFieldEditorParent());
 
-		cqi_server_port = new IntegerFieldEditor(TBXPreferences.CQI_SERVER_PORT,
+		cqi_server_port = new IntegerFieldEditor(CQPPreferences.CQI_SERVER_PORT,
 				Messages.CQPPreferencePage_12, getFieldEditorParent());
 
-		cqi_server_user = new StringFieldEditor(TBXPreferences.CQI_SERVER_LOGIN,
+		cqi_server_user = new StringFieldEditor(CQPPreferences.CQI_SERVER_LOGIN,
 				Messages.CQPPreferencePage_13, getFieldEditorParent());
 
-		cqi_server_password = new StringFieldEditor(TBXPreferences.CQI_SERVER_PASSWORD,
+		cqi_server_password = new StringFieldEditor(CQPPreferences.CQI_SERVER_PASSWORD,
 				Messages.CQPPreferencePage_14, getFieldEditorParent());
 
 		cqi_server_path_to_executable = new FileFieldEditor(
-				TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, Messages.CQPPreferencePage_15,
+				CQPPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, Messages.CQPPreferencePage_15,
 				getFieldEditorParent());
 
 //		cqi_server_path_to_registry = new DirectoryFieldEditor(
 //				CQI_SERVER_PATH_TO_REGISTRY, Messages.CQPPreferencePage_16,
 //				getFieldEditorParent());
 		cqi_server_path_to_init_file = new FileFieldEditor(
-				TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE, Messages.CQPPreferencePage_17,
+				CQPPreferences.CQI_SERVER_PATH_TO_INIT_FILE, Messages.CQPPreferencePage_17,
 				getFieldEditorParent());
 		cqi_server_additional_options = new StringFieldEditor(
-				TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, Messages.CQPPreferencePage_18,
+				CQPPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, Messages.CQPPreferencePage_18,
 				getFieldEditorParent());
 
 		addField(cqi_use_network);
@@ -154,10 +155,10 @@
 
 		Preferences preferences = org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE.getNode(Application.PLUGIN_ID);
 		boolean useNetwork = preferences.getBoolean(
-				TBXPreferences.CQI_NETWORK_MODE,
+				CQPPreferences.CQI_NETWORK_MODE,
 				false);
 		boolean serverIsRemote = preferences.getBoolean(
-				TBXPreferences.CQI_SERVER_IS_REMOTE,
+				CQPPreferences.CQI_SERVER_IS_REMOTE,
 				false);
 		updateFieldsState(useNetwork, serverIsRemote);
 	}
@@ -213,7 +214,7 @@
 	 */
 	@Override
 	public void init(IWorkbench workbench) {
-		this.setPreferenceStore(new TXMPreferenceStore(TBXPreferences.PREFERENCES_NODE));
+		this.setPreferenceStore(new TXMPreferenceStore(CQPPreferences.PREFERENCES_NODE));
 	}
 
 	/* (non-Javadoc)
@@ -225,12 +226,12 @@
 		boolean serverIsRemote = false;
 		boolean update = false;
 		if (((FieldEditor) event.getSource()).getPreferenceName().equals(
-				TBXPreferences.CQI_SERVER_IS_REMOTE)) {
+				CQPPreferences.CQI_SERVER_IS_REMOTE)) {
 			useNetwork = cqi_use_network.getBooleanValue();
 			serverIsRemote = (Boolean) event.getNewValue();
 			update = true;
 		} else if (((FieldEditor) event.getSource()).getPreferenceName().equals(
-				TBXPreferences.CQI_NETWORK_MODE)) {
+				CQPPreferences.CQI_NETWORK_MODE)) {
 			useNetwork = (Boolean) event.getNewValue();
 			serverIsRemote = cqi_server_is_remote.getBooleanValue();
 			update = true;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/Application.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/Application.java	(revision 508)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/Application.java	(revision 509)
@@ -53,6 +53,7 @@
 import org.osgi.framework.ServiceReference;
 import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.preferences.TXMPreferences;
+import org.txm.searchengine.cqp.CQPPreferences;
 import org.txm.statsengine.r.core.preferences.RPreferences;
 import org.txm.utils.logger.Log;
 
@@ -216,8 +217,8 @@
 	private boolean parseCommandLine() {
 		boolean exit = false;
 		String[] optionsForPreferences = {
-				TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE,
-				TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE,
+				CQPPreferences.CQI_SERVER_PATH_TO_EXECUTABLE,
+				CQPPreferences.CQI_SERVER_PATH_TO_INIT_FILE,
 //				TBXPreferences.CQI_SERVER_PATH_TO_REGISTRY,
 				RPreferences.PATH_TO_EXECUTABLE,
 				TBXPreferences.INSTALL_DIR };
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbProcess.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbProcess.java	(revision 508)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbProcess.java	(revision 509)
@@ -38,6 +38,7 @@
 import org.apache.commons.lang.StringUtils;
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.preferences.TBXPreferences;
+import org.txm.searchengine.cqp.CQPPreferences;
 import org.txm.searchengine.cqp.clientExceptions.ServerNotFoundException;
 import org.txm.utils.logger.Log;
 
@@ -242,7 +243,7 @@
 	 */
 	public static String getCWBLocation()
 	{
-		String cwbLoc = org.txm.Toolbox.getParam(TBXPreferences.CQI_SERVER_PATH_TO_CQPLIB)+File.separator;
+		String cwbLoc = org.txm.Toolbox.getParam(CQPPreferences.CQI_SERVER_PATH_TO_CQPLIB)+File.separator;
 
 		if (!new File(cwbLoc).exists()) {
 			System.out.println(TXMCoreMessages.CwbProcess_5+cwbLoc);
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java	(revision 508)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CwbEncode.java	(revision 509)
@@ -38,6 +38,7 @@
 import org.txm.Toolbox;
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.core.preferences.TBXPreferences;
+import org.txm.searchengine.cqp.CQPPreferences;
 import org.txm.searchengine.cqp.clientExceptions.ServerNotFoundException;
 import org.txm.stat.utils.ConsoleProgressBar;
 import org.txm.utils.OSDetector;
@@ -180,7 +181,7 @@
 		 */
 
 		// Warning !! for WINDOWS ONLY the "" value does not work with the ProcessBuilder we must set the value to "\"\""
-		String empty_value_code = Toolbox.getParam(TBXPreferences.CQP_EMPTY_VALUE_CODE);
+		String empty_value_code = Toolbox.getParam(CQPPreferences.CQP_EMPTY_VALUE_CODE);
 		if (OSDetector.isFamilyWindows()) {
 			if (empty_value_code == null) empty_value_code = "\"\"";
 			empty_value_code = empty_value_code.trim();
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/MemCqiServer.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/MemCqiServer.java	(revision 508)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/MemCqiServer.java	(revision 509)
@@ -150,7 +150,7 @@
 			
 			try {
 				String path = System.getProperty("java.library.path");
-				String libpath = System.getProperty("path.separator")+Toolbox.getParam(TBXPreferences.CQI_SERVER_PATH_TO_CQPLIB);
+				String libpath = System.getProperty("path.separator")+Toolbox.getParam(CQPPreferences.CQI_SERVER_PATH_TO_CQPLIB);
 				if (!path.contains(libpath)) {
 					path += libpath;
 				}
@@ -452,7 +452,7 @@
 		String[] strings = {"je", "jamais"};
 		int[] strucpos = {0, 1, 2, 3 , 4};
 
-		Toolbox.setParam(TBXPreferences.CQI_SERVER_PATH_TO_CQPLIB, pathToExecutable);
+		Toolbox.setParam(CQPPreferences.CQI_SERVER_PATH_TO_CQPLIB, pathToExecutable);
 
 		MemCqiServer server = new MemCqiServer(pathToExecutable, pathToRegistry, pathToInitFile, " -b 10000000 -d OFF", false);
 		if (server.start()) System.out.println("Mem Server ok");
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPPreferences.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPPreferences.java	(revision 0)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPPreferences.java	(revision 509)
@@ -0,0 +1,64 @@
+package org.txm.searchengine.cqp;
+
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.service.prefs.Preferences;
+import org.txm.core.messages.TXMCoreMessages;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.utils.logger.Log;
+
+public class CQPPreferences extends TXMPreferences {
+	
+	public static String PREFERENCES_NODE = FrameworkUtil.getBundle(CQPPreferences.class).getSymbolicName();
+	
+	/** The Constant CQI_SERVER_HOST. */
+	public static final String CQI_SERVER_HOST = "cqi_server_host"; //$NON-NLS-1$
+
+	/** The Constant CQI_SERVER_PORT. */
+	public static final String CQI_SERVER_PORT = "cqi_server_port"; //$NON-NLS-1$
+
+	/** The Constant CQI_SERVER_LOGIN. */
+	public static final String CQI_SERVER_LOGIN = "cqi_server_login"; //$NON-NLS-1$
+
+	/** The Constant CQI_SERVER_PASSWORD. */
+	public static final String CQI_SERVER_PASSWORD = "cqi_server_password"; //$NON-NLS-1$
+
+	/** The Constant CQI_SERVER_PATH_TO_EXECUTABLE. */
+	public static final String CQI_SERVER_PATH_TO_EXECUTABLE = "cqi_server_path_to_executable"; //$NON-NLS-1$
+
+	public static final String CQI_SERVER_PATH_TO_CQPLIB = "cqi_server_path_to_cqplib"; //$NON-NLS-1$
+
+	/** The Constant CQI_SERVER_PATH_TO_INIT_FILE. */
+	public static final String CQI_SERVER_PATH_TO_INIT_FILE = "cqi_server_path_to_init_file"; //$NON-NLS-1$
+
+	/** The Constant CQI_SERVER_ADDITIONAL_OPTIONS. */
+	public static final String CQI_SERVER_ADDITIONAL_OPTIONS = "cqi_server_additional_options"; //$NON-NLS-1$
+
+	/** The Constant CQI_SERVER_MONITOR_OUTPUT. */
+	public static final String CQI_SERVER_MONITOR_OUTPUT = "cqi_server_monitor_output"; //$NON-NLS-1$
+
+	/** The Constant CQI_SERVER_IS_REMOTE. */
+	public static final String CQI_SERVER_IS_REMOTE = "cqi_server_is_remote"; //$NON-NLS-1$
+
+	/** The Constant CQI_SERVER_MODE. */
+	public static final String CQI_NETWORK_MODE = "cqi_server_mode"; //$NON-NLS-1$
+
+	public static final String CQP_EMPTY_VALUE_CODE = "cqp_empty_value_code";
+
+	@Override
+	public void initializeDefaultPreferences() {
+		Log.info(TXMCoreMessages.Toolbox_4 + TBXPreferences.getID()); 
+
+		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
+		
+		preferences.put(CQI_SERVER_ADDITIONAL_OPTIONS, "-b 1000000 -d OFF"); //$NON-NLS-1$
+		preferences.put(CQI_SERVER_PORT, "4877"); //$NON-NLS-1$
+		preferences.put(CQI_SERVER_HOST, "localhost"); //$NON-NLS-1$
+		preferences.put(CQI_SERVER_LOGIN, "anonymous"); //$NON-NLS-1$
+		preferences.put(CQI_SERVER_PASSWORD, ""); //$NON-NLS-1$
+		preferences.put(CQI_SERVER_IS_REMOTE, "" + false); //$NON-NLS-1$
+		preferences.putBoolean(CQI_NETWORK_MODE, false); //$NON-NLS-1$
+		preferences.put(CQP_EMPTY_VALUE_CODE, ""); //$NON-NLS-1$
+	}
+}

Property changes on: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPPreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPEngine.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPEngine.java	(revision 508)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPEngine.java	(revision 509)
@@ -45,17 +45,17 @@
 		
 		boolean cqiserverok = false;
 		
-		useNetCQi = Boolean.parseBoolean(TXMPreferences.getString(TBXPreferences.CQI_NETWORK_MODE, TBXPreferences.PREFERENCES_NODE));
+		useNetCQi = Boolean.parseBoolean(TXMPreferences.getString(CQPPreferences.CQI_NETWORK_MODE, CQPPreferences.PREFERENCES_NODE));
 
 		Log.warning("Killing CQP and RServe process if any");
 		killSearchEngine();
 
 		
-		boolean remote = Boolean.parseBoolean(TXMPreferences.getString(TBXPreferences.CQI_SERVER_IS_REMOTE, TBXPreferences.PREFERENCES_NODE));
+		boolean remote = Boolean.parseBoolean(TXMPreferences.getString(CQPPreferences.CQI_SERVER_IS_REMOTE, CQPPreferences.PREFERENCES_NODE));
 		state = false;
 		// test if must-have properties for CWB are set
 
-		String exec_path = TXMPreferences.getString(TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, TBXPreferences.PREFERENCES_NODE);
+		String exec_path = TXMPreferences.getString(CQPPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, CQPPreferences.PREFERENCES_NODE);
 		String reg_path = ""; // new way that concats registry of loaded corpus
 		String path_separator = System.getProperty("path.separator");
 		for (Base b : Toolbox.workspace.getProject("default").getBases()) {
@@ -82,7 +82,7 @@
 		if (reg_path.length() > 0) reg_path = reg_path.substring(path_separator.length()); // remove first path_separator
 		reg_path = reg_path.replace("\\\\", "//"); // fix the UNC paths for mingw
 		
-		String init_path = TXMPreferences.getString(TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE, TBXPreferences.PREFERENCES_NODE);
+		String init_path = TXMPreferences.getString(CQPPreferences.CQI_SERVER_PATH_TO_INIT_FILE, CQPPreferences.PREFERENCES_NODE);
 
 
 		if (!remote) {
@@ -96,9 +96,9 @@
 						cqiServer = new MemCqiServer(exec_path,
 								reg_path, 
 								init_path, 
-								TXMPreferences.getString(TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, TBXPreferences.PREFERENCES_NODE)
-								+ " -P " + TXMPreferences.getString(TBXPreferences.CQI_SERVER_PORT, TBXPreferences.PREFERENCES_NODE), //$NON-NLS-1$
-								Boolean.parseBoolean(TXMPreferences.getString(TBXPreferences.CQI_SERVER_MONITOR_OUTPUT, TBXPreferences.PREFERENCES_NODE)));
+								TXMPreferences.getString(CQPPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, CQPPreferences.PREFERENCES_NODE)
+								+ " -P " + TXMPreferences.getString(CQPPreferences.CQI_SERVER_PORT, CQPPreferences.PREFERENCES_NODE), //$NON-NLS-1$
+								Boolean.parseBoolean(TXMPreferences.getString(CQPPreferences.CQI_SERVER_MONITOR_OUTPUT, CQPPreferences.PREFERENCES_NODE)));
 					} catch (Exception e) {
 						// TODO Auto-generated catch block
 						org.txm.utils.logger.Log.printStackTrace(e);
@@ -107,9 +107,9 @@
 					cqiServer = new NetCqiServer(exec_path,
 							reg_path, 
 							init_path, 
-							TXMPreferences.getString(TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, TBXPreferences.PREFERENCES_NODE)
-							+ " -P " + TXMPreferences.getString(TBXPreferences.CQI_SERVER_PORT, TBXPreferences.PREFERENCES_NODE), //$NON-NLS-1$
-							Boolean.parseBoolean(TXMPreferences.getString(TBXPreferences.CQI_SERVER_MONITOR_OUTPUT, TBXPreferences.PREFERENCES_NODE)));
+							TXMPreferences.getString(CQPPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, CQPPreferences.PREFERENCES_NODE)
+							+ " -P " + TXMPreferences.getString(CQPPreferences.CQI_SERVER_PORT, CQPPreferences.PREFERENCES_NODE), //$NON-NLS-1$
+							Boolean.parseBoolean(TXMPreferences.getString(CQPPreferences.CQI_SERVER_MONITOR_OUTPUT, CQPPreferences.PREFERENCES_NODE)));
 				}
 				if (cqiServer != null)
 					cqiserverok = cqiServer.start();
@@ -127,23 +127,23 @@
 						cqiserverok = false;
 					}
 				} else {
-					int port = Integer.parseInt(TXMPreferences.getString(TBXPreferences.CQI_SERVER_PORT, TBXPreferences.PREFERENCES_NODE));
-					String host = TXMPreferences.getString(TBXPreferences.CQI_SERVER_HOST, TBXPreferences.PREFERENCES_NODE);
+					int port = Integer.parseInt(TXMPreferences.getString(CQPPreferences.CQI_SERVER_PORT, CQPPreferences.PREFERENCES_NODE));
+					String host = TXMPreferences.getString(CQPPreferences.CQI_SERVER_HOST, CQPPreferences.PREFERENCES_NODE);
 					cqiClient = new NetCqiClient(host, port);
 				}
 			}
 		} catch (NumberFormatException e1) {
-			Log.severe(TXMCoreMessages.Toolbox_wrong_port + TXMPreferences.getString(TBXPreferences.CQI_SERVER_PORT, TBXPreferences.PREFERENCES_NODE)); 
+			Log.severe(TXMCoreMessages.Toolbox_wrong_port + TXMPreferences.getString(CQPPreferences.CQI_SERVER_PORT, CQPPreferences.PREFERENCES_NODE)); 
 		} catch (ServerNotFoundException e1) {
-			Log.severe(TXMCoreMessages.Error_CONNECTION_FAILED + TXMPreferences.getString(TBXPreferences.CQI_SERVER_HOST, TBXPreferences.PREFERENCES_NODE)
-					+ TXMCoreMessages.Toolbox_27 + TXMPreferences.getString(TBXPreferences.CQI_SERVER_PORT, TBXPreferences.PREFERENCES_NODE)); 
+			Log.severe(TXMCoreMessages.Error_CONNECTION_FAILED + TXMPreferences.getString(CQPPreferences.CQI_SERVER_HOST, CQPPreferences.PREFERENCES_NODE)
+					+ TXMCoreMessages.Toolbox_27 + TXMPreferences.getString(CQPPreferences.CQI_SERVER_PORT, CQPPreferences.PREFERENCES_NODE)); 
 		}
 
 		// try connecting to the CWB server
 		try {
 			if (cqiserverok) {
-				String login = TXMPreferences.getString(TBXPreferences.CQI_SERVER_LOGIN, TBXPreferences.PREFERENCES_NODE);
-				String password = TXMPreferences.getString(TBXPreferences.CQI_SERVER_PASSWORD, TBXPreferences.PREFERENCES_NODE);
+				String login = TXMPreferences.getString(CQPPreferences.CQI_SERVER_LOGIN, CQPPreferences.PREFERENCES_NODE);
+				String password = TXMPreferences.getString(CQPPreferences.CQI_SERVER_PASSWORD, CQPPreferences.PREFERENCES_NODE);
 				state = cqiClient.connect(login, password);
 			}
 		} catch (Exception e1) {
@@ -152,7 +152,7 @@
 	
 		if (state == false) {
 			System.out.println(TXMCoreMessages.Toolbox_29); 
-			if (cqiClient instanceof NetCqiClient) System.out.println(TXMCoreMessages.Toolbox_30 + TXMPreferences.getString(TBXPreferences.CQI_SERVER_LOGIN, TBXPreferences.PREFERENCES_NODE) + " " + TXMPreferences.getString(TBXPreferences.CQI_SERVER_PASSWORD, TBXPreferences.PREFERENCES_NODE) + TXMPreferences.getString(TBXPreferences.CQI_SERVER_HOST, TBXPreferences.PREFERENCES_NODE) + " " + Integer.parseInt(TXMPreferences.getString(TBXPreferences.CQI_SERVER_PORT, TBXPreferences.PREFERENCES_NODE))); //$NON-NLS-1$ //$NON-NLS-2$
+			if (cqiClient instanceof NetCqiClient) System.out.println(TXMCoreMessages.Toolbox_30 + TXMPreferences.getString(CQPPreferences.CQI_SERVER_LOGIN, CQPPreferences.PREFERENCES_NODE) + " " + TXMPreferences.getString(CQPPreferences.CQI_SERVER_PASSWORD, CQPPreferences.PREFERENCES_NODE) + TXMPreferences.getString(CQPPreferences.CQI_SERVER_HOST, CQPPreferences.PREFERENCES_NODE) + " " + Integer.parseInt(TXMPreferences.getString(CQPPreferences.CQI_SERVER_PORT, CQPPreferences.PREFERENCES_NODE))); //$NON-NLS-1$ //$NON-NLS-2$
 			if (cqiServer != null && cqiServer instanceof NetCqiServer)
 				System.out.println(TXMCoreMessages.Toolbox_33 + cqiServer.getLastCmdLine());
 		} else {
@@ -300,7 +300,7 @@
 	 * kill cqpserver process.
 	 */
 	private static void killSearchEngine() {
-		if (!TXMPreferences.getBoolean(TBXPreferences.CQI_SERVER_IS_REMOTE, TBXPreferences.PREFERENCES_NODE))
+		if (!TXMPreferences.getBoolean(CQPPreferences.CQI_SERVER_IS_REMOTE, CQPPreferences.PREFERENCES_NODE))
 			// Windows OS
 			if (OSDetector.isFamilyWindows()) {
 				try {
@@ -333,23 +333,23 @@
 			}
 		// Mac, Linux
 			else {
-				String cmd = TXMCoreMessages.Toolbox_37 + TXMPreferences.getString(TBXPreferences.CQI_SERVER_PORT, TBXPreferences.PREFERENCES_NODE) + TXMCoreMessages.Toolbox_38;
+				String cmd = TXMCoreMessages.Toolbox_37 + TXMPreferences.getString(CQPPreferences.CQI_SERVER_PORT, CQPPreferences.PREFERENCES_NODE) + TXMCoreMessages.Toolbox_38;
 				try {
 					//Process p = Runtime.getRuntime().exec("killall -9 cqpserver"); //$NON-NLS-1$
 					// System.out.println("kill `ps aux | grep cqpserver | awk '/-P "
-					// + TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, CQI_SERVER_PORT) + "/ {print $2}'`");
+					// + TXMPreferences.getString(CQPPreferences.PREFERENCES_NODE, CQI_SERVER_PORT) + "/ {print $2}'`");
 					// String[] args =
 					// {"kill","`ps aux | grep cqpserver | awk '/-P " +
-					// TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, CQI_SERVER_PORT) + "/ {print $2}'`"};
+					// TXMPreferences.getString(CQPPreferences.PREFERENCES_NODE, CQI_SERVER_PORT) + "/ {print $2}'`"};
 					// System.out.println("before Sh constructor");
 					Sh sh = new Sh(""); //$NON-NLS-1$
 					// System.out.println("after Sh constructor");
 					// System.out.println("EXECUTE SH : "+"kill `ps aux | grep cqpserver | awk '/-P "
-					// + TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, CQI_SERVER_PORT) + "/ {print $2}'`");
+					// + TXMPreferences.getString(CQPPreferences.PREFERENCES_NODE, CQI_SERVER_PORT) + "/ {print $2}'`");
 					sh.setIsc(cmd);
 					sh.sh();
 					// Runtime.getRuntime().exec("sh kill `ps aux | grep cqpserver | awk '/-P "
-					// + TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, CQI_SERVER_PORT) + "/ {print $2}'`");
+					// + TXMPreferences.getString(CQPPreferences.PREFERENCES_NODE, CQI_SERVER_PORT) + "/ {print $2}'`");
 
 				} catch (Exception e) {
 					Log.severe(TXMCoreMessages.Toolbox_39+cmd+TXMCoreMessages.Toolbox_40+Log.toString(e));
Index: tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/CQPPreferences.java
===================================================================
--- tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/CQPPreferences.java	(revision 508)
+++ tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/CQPPreferences.java	(revision 509)
@@ -1,18 +0,0 @@
-package org.txm.libs.cqp;
-
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.osgi.service.prefs.Preferences;
-import org.txm.core.preferences.TXMPreferences;
-
-public class CQPPreferences extends TXMPreferences {
-
-	public static final String PREFERENCES_NODE = "cwbinstaller";
-	
-	public static final String VERSION = "cwbinstaller.commands.version";
-
-	@Override
-	public void initializeDefaultPreferences() {
-		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
-		preferences.put(VERSION, "0.0");
-	}
-}
Index: tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/DoInstallStep.java
===================================================================
--- tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/DoInstallStep.java	(revision 508)
+++ tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/DoInstallStep.java	(revision 509)
@@ -28,9 +28,9 @@
 	public void preInstall() {
 		
 		String CQPFRAGMENT = "org.txm.libs.cqp."+System.getProperty("osgi.os");
-		
+		//TODO: fix preferneces logic between org.txm.cqp.lib et org.txm.searchengine.cqp
 		Log.info("CQP.DoInstallStep.preInstall()");
-		String saved = TXMPreferences.getString(CQPPreferences.VERSION, CQPPreferences.PREFERENCES_NODE);
+		String saved = TXMPreferences.getString(CQPLibPreferences.VERSION, CQPLibPreferences.PREFERENCES_NODE);
 		Version currentVersion = BundleUtils.getBundleVersion(CQPFRAGMENT); // the CQPFRAGMENT plugin contains the right version
 		
 		if (saved != null && saved.length() > 0) {
@@ -80,9 +80,9 @@
 		
 		File execFile = new File(OSDir, "cqpserver"+ext);
 
-		TXMPreferences.putString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.CQI_SERVER_PATH_TO_CQPLIB, OSDir.getAbsolutePath());
-		TXMPreferences.putString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.CQI_SERVER_PATH_TO_INIT_FILE, initFile.getAbsolutePath());
-		TXMPreferences.putString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, execFile.getAbsolutePath());
+		TXMPreferences.putString(CQPLibPreferences.PREFERENCES_NODE, CQPLibPreferences.CQI_SERVER_PATH_TO_CQPLIB, OSDir.getAbsolutePath());
+		TXMPreferences.putString(CQPLibPreferences.PREFERENCES_NODE, CQPLibPreferences.CQI_SERVER_PATH_TO_INIT_FILE, initFile.getAbsolutePath());
+		TXMPreferences.putString(CQPLibPreferences.PREFERENCES_NODE, CQPLibPreferences.CQI_SERVER_PATH_TO_EXECUTABLE, execFile.getAbsolutePath());
 		if (!Util.isWindows()) { 
 			try {
 				Log.info("Setting execution file rights to: "+OSDir.getAbsolutePath());
@@ -105,6 +105,6 @@
 		}
 		
 		Log.warning("SearchEngine preferences set with: "+OSDir.getAbsolutePath()+ ", "+initFile.getAbsolutePath()+ " and "+execFile.getAbsolutePath());
-		TXMPreferences.putString(CQPPreferences.PREFERENCES_NODE, CQPPreferences.VERSION, currentVersion.toString());
+		TXMPreferences.putString(CQPLibPreferences.PREFERENCES_NODE, CQPLibPreferences.VERSION, currentVersion.toString());
 	}
 }
Index: tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/CQPLibPreferences.java
===================================================================
--- tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/CQPLibPreferences.java	(revision 0)
+++ tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/CQPLibPreferences.java	(revision 509)
@@ -0,0 +1,34 @@
+package org.txm.libs.cqp;
+
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.service.prefs.Preferences;
+import org.txm.core.messages.TXMCoreMessages;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.utils.logger.Log;
+
+public class CQPLibPreferences extends TXMPreferences {
+	
+	public static String PREFERENCES_NODE = FrameworkUtil.getBundle(CQPLibPreferences.class).getSymbolicName();
+	
+	/** The Constant CQI_SERVER_PATH_TO_EXECUTABLE. */
+	public static final String VERSION = "version"; //$NON-NLS-1$
+
+	
+	/** The Constant CQI_SERVER_PATH_TO_EXECUTABLE. */
+	public static final String CQI_SERVER_PATH_TO_EXECUTABLE = "cqi_server_path_to_executable"; //$NON-NLS-1$
+
+	public static final String CQI_SERVER_PATH_TO_CQPLIB = "cqi_server_path_to_cqplib"; //$NON-NLS-1$
+	
+	/** The Constant CQI_SERVER_PATH_TO_INIT_FILE. */
+	public static final String CQI_SERVER_PATH_TO_INIT_FILE = "cqi_server_path_to_init_file"; //$NON-NLS-1$
+	
+	@Override
+	public void initializeDefaultPreferences() {
+		Log.info(TXMCoreMessages.Toolbox_4 + TBXPreferences.getID()); 
+
+		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
+		
+	}
+}

Property changes on: tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/CQPLibPreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 508)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 509)
@@ -21,40 +21,6 @@
 	public static final String EXPERT_USER = "txm_expert_user"; //$NON-NLS-1$
 	public static final String LOG_STACKTRACE = "log_stacktrace"; //$NON-NLS-1$
 
-	/** The Constant CQI_SERVER_HOST. */
-	public static final String CQI_SERVER_HOST = "cqi_server_host"; //$NON-NLS-1$
-
-	/** The Constant CQI_SERVER_PORT. */
-	public static final String CQI_SERVER_PORT = "cqi_server_port"; //$NON-NLS-1$
-
-	/** The Constant CQI_SERVER_LOGIN. */
-	public static final String CQI_SERVER_LOGIN = "cqi_server_login"; //$NON-NLS-1$
-
-	/** The Constant CQI_SERVER_PASSWORD. */
-	public static final String CQI_SERVER_PASSWORD = "cqi_server_password"; //$NON-NLS-1$
-
-	/** The Constant CQI_SERVER_PATH_TO_EXECUTABLE. */
-	public static final String CQI_SERVER_PATH_TO_EXECUTABLE = "cqi_server_path_to_executable"; //$NON-NLS-1$
-
-	public static final String CQI_SERVER_PATH_TO_CQPLIB = "cqi_server_path_to_cqplib"; //$NON-NLS-1$
-
-	/** The Constant CQI_SERVER_PATH_TO_INIT_FILE. */
-	public static final String CQI_SERVER_PATH_TO_INIT_FILE = "cqi_server_path_to_init_file"; //$NON-NLS-1$
-
-	/** The Constant CQI_SERVER_ADDITIONAL_OPTIONS. */
-	public static final String CQI_SERVER_ADDITIONAL_OPTIONS = "cqi_server_additional_options"; //$NON-NLS-1$
-
-	/** The Constant CQI_SERVER_MONITOR_OUTPUT. */
-	public static final String CQI_SERVER_MONITOR_OUTPUT = "cqi_server_monitor_output"; //$NON-NLS-1$
-
-	/** The Constant CQI_SERVER_IS_REMOTE. */
-	public static final String CQI_SERVER_IS_REMOTE = "cqi_server_is_remote"; //$NON-NLS-1$
-
-	/** The Constant CQI_SERVER_MODE. */
-	public static final String CQI_NETWORK_MODE = "cqi_server_mode"; //$NON-NLS-1$
-
-	public static final String CQP_EMPTY_VALUE_CODE = "cqp_empty_value_code";
-
 	/** The Constant SCRIPT_ROOT_DIR. */
 	public static final String SCRIPT_ROOT_DIR = "script_root_dir"; //$NON-NLS-1$
 
@@ -95,23 +61,8 @@
 	public static final String EXPORT_COLSEPARATOR = "export_colseparator"; //$NON-NLS-1$
 	/** The Constant EXPORT_TXTSEPARATOR. */
 	public static final String EXPORT_TXTSEPARATOR = "export_txtseparator"; //$NON-NLS-1$
-	
-	/** Contains all the parameters keys. */
-	public static final String[] existingKeys = { LOG_LEVEL, LOG_STACKTRACE, ADD_TECH_LOGS, LOG_DIR,
-		LOG_IN_FILE, CQI_SERVER_HOST, CQI_SERVER_PORT, CQI_SERVER_LOGIN,
-		CQI_SERVER_PASSWORD, CQI_SERVER_PATH_TO_EXECUTABLE,CQI_SERVER_PATH_TO_CQPLIB,
-		CQI_SERVER_ADDITIONAL_OPTIONS, CQI_SERVER_MONITOR_OUTPUT,
-		CQI_SERVER_IS_REMOTE, CQI_NETWORK_MODE, CQP_EMPTY_VALUE_CODE, SCRIPT_ROOT_DIR,
-		SCRIPT_CURRENT_DIR, UI_LOCALE, WORKSPACE_LOCATION, INSTALL_DIR,
-		USER_TXM_HOME,
-		//		IS_R_MANDATORY, R_PATH_TO_EXECUTABLE, R_DEBUG, R_REMOTE, R_SERVER_ADDRESS,
-		//		R_PORT, R_USER, R_PASSWORD, R_PACKAGES_PATH, R_RARGS, R_RSERVEARGS, R_DISABLE, R_FILE_TRANSFERT,R_SVG_DEVICE,
 
-		TREETAGGER_INSTALL_PATH, TREETAGGER_MODELS_PATH,TREETAGGER_OPTIONS, TREETAGGER_APOSTROPHE,
-		METADATA_ENCODING, METADATA_COLSEPARATOR,METADATA_TXTSEPARATOR
 
-	};
-
 	public static String getID() {
 		return "org.txm.core";
 	}
@@ -127,22 +78,17 @@
 		preferences.put(TBXPreferences.WORKSPACE_LOCATION, System.getProperty("user.home")+"/TXM/workspaces/default.xml");
 		
 		preferences.putBoolean(TBXPreferences.EXPERT_USER, false); //$NON-NLS-1$
+		
 		preferences.put(TBXPreferences.LOG_LEVEL, "OFF"); //$NON-NLS-1$
 		preferences.putBoolean(TBXPreferences.ADD_TECH_LOGS, false); //$NON-NLS-1$
 		preferences.putBoolean(TBXPreferences.LOG_STACKTRACE, true); //$NON-NLS-1$
 		preferences.putBoolean(TBXPreferences.LOG_IN_FILE, false); //$NON-NLS-1$
-		preferences.put(TBXPreferences.CQI_SERVER_ADDITIONAL_OPTIONS, "-b 1000000 -d OFF"); //$NON-NLS-1$
-		preferences.put(TBXPreferences.CQI_SERVER_PORT, "4877"); //$NON-NLS-1$
-		preferences.put(TBXPreferences.CQI_SERVER_HOST, "localhost"); //$NON-NLS-1$
-		preferences.put(TBXPreferences.CQI_SERVER_LOGIN, "anonymous"); //$NON-NLS-1$
-		preferences.put(TBXPreferences.CQI_SERVER_PASSWORD, ""); //$NON-NLS-1$
-		preferences.put(TBXPreferences.CQI_SERVER_IS_REMOTE, "" + false); //$NON-NLS-1$
-		preferences.putBoolean(TBXPreferences.CQI_NETWORK_MODE, false); //$NON-NLS-1$
-		preferences.put(TBXPreferences.CQP_EMPTY_VALUE_CODE, ""); //$NON-NLS-1$
 		preferences.put(TBXPreferences.UI_LOCALE, "fr"); //$NON-NLS-1$
+		
 		preferences.put(TBXPreferences.TREETAGGER_INSTALL_PATH, System.getProperty("osgi.user.area") + "/TXM/treetagger"); //$NON-NLS-1$ //$NON-NLS-2$
 		preferences.put(TBXPreferences.TREETAGGER_MODELS_PATH, TXMPreferences.getString(TBXPreferences.TREETAGGER_INSTALL_PATH, TBXPreferences.PREFERENCES_NODE) + "/models"); //$NON-NLS-1$
 		preferences.put(TBXPreferences.TREETAGGER_APOSTROPHE, "false"); //$NON-NLS-1$
+		
 		preferences.put(TBXPreferences.METADATA_ENCODING, "UTF-8"); //$NON-NLS-1$
 		preferences.put(TBXPreferences.METADATA_TXTSEPARATOR, "\""); //$NON-NLS-1$
 		
