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

Index: tmp/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java
===================================================================
--- tmp/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java	(revision 0)
+++ tmp/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java	(revision 679)
@@ -0,0 +1,92 @@
+package org.txm.treetagger.core.preferences;
+
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.Properties;
+
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.service.prefs.Preferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.utils.io.IOUtils;
+
+/**
+ * Default preferences initializer.
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ *
+ */
+public class TreeTaggerPreferences extends TXMPreferences {
+
+
+	// auto populate the preference node qualifier from the current bundle id
+	public static final String PREFERENCES_NODE = FrameworkUtil.getBundle(TreeTaggerPreferences.class).getSymbolicName();
+	
+	public static final String PREFERENCES_PREFIX = "treetagger_"; //$NON-NLS-1$
+	
+
+	/**
+	 * Installation path.
+	 */
+	public static final String INSTALL_PATH = PREFERENCES_PREFIX + "install_path"; //$NON-NLS-1$
+
+	/**
+	 * Models path.
+	 */
+	public static final String MODELS_PATH = PREFERENCES_PREFIX + "models_path"; //$NON-NLS-1$
+	
+	public static final String OPTIONS = PREFERENCES_PREFIX + "options"; //$NON-NLS-1$
+	
+	public static final String FIX_APOSTROPHES = PREFERENCES_PREFIX + "fix_apostrophes"; //$NON-NLS-1$
+
+
+	
+	@Override
+	public void initializeDefaultPreferences() {
+
+		// Default preferences
+		Preferences preferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
+		
+		String installPath = System.getProperty("osgi.user.area") + "/TXM/treetagger"; //$NON-NLS-1$ //$NON-NLS-2$
+		
+		preferences.put(INSTALL_PATH, installPath);
+		preferences.put(MODELS_PATH, installPath + "/models"); //$NON-NLS-1$
+		preferences.putBoolean(FIX_APOSTROPHES, false);
+
+		
+		// FIXME: need to validate this code + need to check if it's still useful
+		
+		// Restore previous TreeTagger preferences
+		File previousPreferenceFile = new File(System.getProperty("java.io.tmpdir"), "org.txm.rcp.prefs"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		if (System.getProperty("os.name").indexOf("Mac") >= 0) { //$NON-NLS-1$ //$NON-NLS-2$
+			previousPreferenceFile = new File("/tmp/org.txm.rcp.prefs"); //$NON-NLS-1$
+		}
+
+		if (previousPreferenceFile.exists()) {
+			try {
+				System.out.println("Restoring preferences (from " + previousPreferenceFile + ")."); //$NON-NLS-1$ //$NON-NLS-2$
+				Properties previousProperties = new Properties();
+				BufferedReader reader = IOUtils.getReader(previousPreferenceFile, "ISO-8859-1"); //$NON-NLS-1$
+				previousProperties.load(reader);
+				
+				String [] keys= {INSTALL_PATH, MODELS_PATH, OPTIONS};
+				for (String k : keys) {
+					if (previousProperties.getProperty(k) != null) {
+						TreeTaggerPreferences.put(PREFERENCES_NODE, k, previousProperties.getProperty(k));
+					}
+				}
+			}
+			catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+
+	}
+	
+}

Property changes on: tmp/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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

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

Index: tmp/org.txm.treetagger.core/plugin.xml
===================================================================
--- tmp/org.txm.treetagger.core/plugin.xml	(revision 0)
+++ tmp/org.txm.treetagger.core/plugin.xml	(revision 679)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer
+            class="org.txm.treetagger.core.preferences.TreeTaggerPreferences">
+      </initializer>
+   </extension>
+
+</plugin>

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

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

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

Index: tmp/org.txm.treetagger.core/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.treetagger.core/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.treetagger.core/META-INF/MANIFEST.MF	(revision 679)
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: TreeTagger Core
+Bundle-SymbolicName: org.txm.treetagger.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.txm.utils,
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.txm.core;bundle-version="0.8.0"
+Export-Package: org.txm.treetagger.core.preferences

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

