[ooo-build-commit] ooeclipse: Branch 'master' - 8 commits

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Nov 24 14:20:20 PST 2010


 core/.project                                                                          |   80 -
 core/META-INF/MANIFEST.MF                                                              |    6 
 core/build/MANIFEST.MF.in                                                              |    6 
 core/plugin.xml                                                                        |   18 
 core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java  |    4 
 core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java            |  270 ++++--
 core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java                    |  402 +++++-----
 core/source/org/openoffice/ide/eclipse/core/internal/model/SDK.java                    |    4 
 core/source/org/openoffice/ide/eclipse/core/internal/model/URE.java                    |  100 +-
 core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java          |  382 +++++----
 core/source/org/openoffice/ide/eclipse/core/internal/model/messages.properties         |    3 
 core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java  |   59 +
 core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java |   80 +
 core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java                |   23 
 core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java    |  252 ++++++
 core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java               |  237 +++++
 core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties          |   24 
 core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java                  |   35 
 core/source/org/openoffice/ide/eclipse/core/model/config/IExtraOptionsProvider.java    |   20 
 core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java                     |  138 ++-
 core/source/org/openoffice/ide/eclipse/core/model/config/NullExtraOptionsProvider.java |   18 
 core/source/org/openoffice/ide/eclipse/core/model/language/AbstractLanguage.java       |   87 +-
 core/source/org/openoffice/ide/eclipse/core/model/utils/SystemHelper.java              |    9 
 core/source/org/openoffice/ide/eclipse/core/utils/FilesFinder.java                     |   15 
 core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java    |   10 
 cpp/META-INF/MANIFEST.MF                                                               |    3 
 cpp/build/MANIFEST.MF.in                                                               |    5 
 cpp/source/org/openoffice/ide/eclipse/cpp/Language.java                                |   24 
 java/META-INF/MANIFEST.MF                                                              |    4 
 java/build/MANIFEST.MF.in                                                              |    6 
 java/source/org/openoffice/ide/eclipse/java/JavaDebugExtraOptionsProvider.java         |   34 
 java/source/org/openoffice/ide/eclipse/java/Language.java                              |   62 +
 32 files changed, 1743 insertions(+), 677 deletions(-)

New commits:
commit 5453835a913fddf0b2336c09563cf4821efc46bf
Merge: fb37332... ad40506...
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Wed Nov 24 23:02:42 2010 +0100

    Merge branch 'ooo-launcher'
    
    Conflicts:
    	core/build/MANIFEST.MF.in
    	core/source/org/openoffice/ide/eclipse/core/helpers/SystemHelper.java
    	core/source/org/openoffice/ide/eclipse/core/internal/helpers/SystemHelper.java
    	core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
    	core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
    	core/source/org/openoffice/ide/eclipse/core/internal/model/SDK.java
    	core/source/org/openoffice/ide/eclipse/core/model/utils/SystemHelper.java
    	cpp/META-INF/MANIFEST.MF
    	java/META-INF/MANIFEST.MF

diff --cc core/META-INF/MANIFEST.MF
index 852debb,94a3b5f..1e5611b
mode 100755,100644..100644
--- a/core/META-INF/MANIFEST.MF
+++ b/core/META-INF/MANIFEST.MF
@@@ -16,11 -16,10 +16,11 @@@ Require-Bundle: org.eclipse.core.runtim
   org.eclipse.help,
   org.eclipse.ui.forms,
   org.junit,
-  org.eclipse.debug.core,
+  org.eclipse.debug.core;visibility:=reexport,
   org.eclipse.debug.ui,
   org.eclipse.ui;bundle-version="3.4.1",
 - javax.xml;bundle-version="1.3.4"
 + javax.xml;bundle-version="1.3.4",
 + org.openoffice.ide.packager.core;bundle-version="0.1.0"
  Bundle-ActivationPolicy: lazy
  Export-Package: org.openoffice.ide.eclipse.core,
   org.openoffice.ide.eclipse.core.actions,
diff --cc core/build/MANIFEST.MF.in
index 5916611,dd692ce..506a7a0
mode 100755,100644..100644
--- a/core/build/MANIFEST.MF.in
+++ b/core/build/MANIFEST.MF.in
@@@ -16,11 -16,10 +16,11 @@@ Require-Bundle: org.eclipse.core.runtim
   org.eclipse.help,
   org.eclipse.ui.forms,
   org.junit,
-  org.eclipse.debug.core,
+  org.eclipse.debug.core;visibility:=reexport,
   org.eclipse.debug.ui,
   org.eclipse.ui;bundle-version="3.4.1",
 - javax.xml;bundle-version="1.3.4"
 + javax.xml;bundle-version="1.3.4",
 + org.openoffice.ide.packager.core;bundle-version="0.1.0"
  Bundle-ActivationPolicy: lazy
  Export-Package: org.openoffice.ide.eclipse.core,
   org.openoffice.ide.eclipse.core.actions,
diff --cc core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
index cff6ee1,d3ff6b6..09f1254
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
@@@ -56,19 -59,21 +59,21 @@@ import org.eclipse.core.runtime.Platfor
  import org.eclipse.debug.core.DebugPlugin;
  import org.eclipse.debug.core.ILaunch;
  import org.eclipse.swt.graphics.Image;
+ import org.openoffice.ide.eclipse.core.PluginLogger;
  import org.openoffice.ide.eclipse.core.gui.ITableElement;
 -import org.openoffice.ide.eclipse.core.helpers.SystemHelper;
  import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
  import org.openoffice.ide.eclipse.core.model.OOoContainer;
+ import org.openoffice.ide.eclipse.core.model.config.IExtraOptionsProvider;
  import org.openoffice.ide.eclipse.core.model.config.IOOo;
  import org.openoffice.ide.eclipse.core.model.config.InvalidConfigException;
 +import org.openoffice.ide.eclipse.core.model.utils.SystemHelper;
  
  /**
-  * Helper class to add the table element features to the OOo classes. All the
-  * {@link IOOo} interface still has to be implemented by the subclasses
+  * Helper class to add the table element features to the OOo classes. All the {@link IOOo} interface still has to be
+  * implemented by the subclasses
   * 
   * @author cbosdonnat
-  *
+  * 
   */
  public abstract class AbstractOOo implements IOOo, ITableElement {
  
diff --cc core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
index 2700ff2,c44d5f9..ffa39d7
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
@@@ -713,4 -728,4 +728,4 @@@ public class OOo extends AbstractOOo 
              return link;
          }
      }
--}
++}
diff --cc core/source/org/openoffice/ide/eclipse/core/internal/model/SDK.java
index 64f51c2,a6b5cb8..ce8b219
mode 100755,100644..100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/SDK.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/SDK.java
diff --cc core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
index f7e073e,d968722..27de55b
mode 100755,100644..100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
@@@ -761,10 -798,9 +798,9 @@@ public class UnoidlProject implements I
              if (pSet) {
                  IMarker marker = prjRes.createMarker(IMarker.PROBLEM);
                  marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
-                 marker.setAttribute(IMarker.MESSAGE, 
-                     Messages.getString("UnoidlProject.NoOOoSdkError")); //$NON-NLS-1$
+                 marker.setAttribute(IMarker.MESSAGE, Messages.getString("UnoidlProject.NoOOoSdkError")); //$NON-NLS-1$
              } else {
 -                prjRes.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
 +                prjRes.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO);
              }
          } catch (CoreException e) {
              if (pSet) {
diff --cc core/source/org/openoffice/ide/eclipse/core/model/utils/SystemHelper.java
index 47ecc38,0000000..7445ad6
mode 100644,000000..100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/utils/SystemHelper.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/utils/SystemHelper.java
@@@ -1,250 -1,0 +1,251 @@@
 +/*************************************************************************
 + *
 + * $RCSfile: SystemHelper.java,v $
 + *
 + * $Revision: 1.4 $
 + *
 + * last change: $Author: cedricbosdo $ $Date: 2007/11/25 20:32:31 $
 + *
 + * The Contents of this file are made available subject to the terms of
 + * the GNU Lesser General Public License Version 2.1
 + *
 + * Sun Microsystems Inc., October, 2000
 + *
 + *
 + * GNU Lesser General Public License Version 2.1
 + * =============================================
 + * Copyright 2000 by Sun Microsystems, Inc.
 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
 + *
 + * This library is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU Lesser General Public
 + * License version 2.1, as published by the Free Software Foundation.
 + *
 + * This library 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
 + * Lesser General Public License for more details.
 + *
 + * You should have received a copy of the GNU Lesser General Public
 + * License along with this library; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + * 
 + * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
 + *
 + * Copyright: 2002 by Sun Microsystems, Inc.
 + *
 + * All Rights Reserved.
 + *
 + * Contributor(s): Cedric Bosdonnat
 + *
 + *
 + ************************************************************************/
 +package org.openoffice.ide.eclipse.core.model.utils;
 +
 +import java.io.File;
 +import java.io.IOException;
 +import java.util.Arrays;
 +import java.util.Iterator;
 +import java.util.Set;
 +import java.util.Map.Entry;
 +
 +import org.eclipse.core.resources.IProject;
 +import org.eclipse.core.resources.IResource;
 +import org.eclipse.core.resources.ResourcesPlugin;
 +import org.eclipse.core.runtime.Path;
 +import org.eclipse.core.runtime.Platform;
 +import org.openoffice.ide.eclipse.core.PluginLogger;
 +import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
 +
 +/**
 + * Helper class for system variables handling.
 + * 
 + * @author cedricbosdo
 + *
 + */
 +public class SystemHelper {
 +    
 +    public static final String PATH_SEPARATOR = System.getProperty("path.separator"); //$NON-NLS-1$
 +    
 +    private static final int COMMAND_ARGS_LENGTH = 3;
 +
 +    /**
 +     * Get a normal Java File from an Eclipse IResource.
 +     * 
 +     * @param pRes the IResource to convert
 +     * 
 +     * @return the equivalent File
 +     */
 +    public static File getFile( IResource pRes ) {
 +        return pRes.getLocation().toFile();
 +    }
 +    
 +    /**
 +     * Get a normal Java File from an {@link IUnoidlProject}.
 +     * 
 +     * @param pPrj {@link IUnoidlProject} to convert
 +     * 
 +     * @return the equivalent File
 +     */
 +    public static File getFile( IUnoidlProject pPrj ) {
 +        IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject( pPrj.getName() );
 +        return getFile( prj );
 +    }
 +    
 +    /**
 +     * Add an environment variable to an array of existing variables.
 +     * 
 +     * @param pEnv the array of existing environment variables where to add the
 +     *         new variable
 +     * @param pName the name of the variable to add
 +     * @param pValue    the value of the variable to add
 +     * 
 +     * @return the completed array
 +     */
 +    public static String[] addPathEnv( String[] pEnv, String pName, String[] pValue ) {
 +        
 +        String values = new String();
 +        for (int i = 0; i < pValue.length; i++) {
 +            String path = pValue[i];
 +            String tmpValue = new Path(path).toOSString();
 +            if (i < pValue.length - 1) {
 +                tmpValue += PATH_SEPARATOR;
 +            }
 +            values += tmpValue;
 +        }
 +        
 +        return addEnv( pEnv, pName, values, PATH_SEPARATOR );
 +    }
 +    
 +    /**
 +     * Add an environment variable to an array of existing variables.
 +     * 
 +     * @param pEnv the array of existing environment variables where to add the
 +     *         new variable
 +     * @param pName the name of the variable to add
 +     * @param pValue    the value of the variable to add
 +     * @param pSeparator the separator to use if there is already a variable with
 +     *         the same name. If <code>null</code>, the old variable will be replaced
 +     * 
 +     * @return the completed array
 +     */
 +    public static String[] addEnv(String[] pEnv, String pName, String pValue,
 +            String pSeparator) {
-         
++        //TODO cdan should add a test for this method (test that the case is preserved even on windows, but compare with ignoring case on windows) 
 +        String[] result = new String[1];  
 +        
 +        if (pEnv != null) { 
 +            int i = 0;
 +            boolean found = false;
 +            
 +            while (!found && i < pEnv.length) {
-                 String tmpEnv = pEnv[i]; 
++                String tmpEnv = pEnv[i];
++                String tmpName = pName;
 +                if (Platform.getOS().equals(Platform.OS_WIN32)) {
 +                    tmpEnv = tmpEnv.toLowerCase();
-                     pName = pName.toLowerCase();
++                    tmpName = pName.toLowerCase();
 +                }
-                 if (tmpEnv.startsWith(pName + "=")) { //$NON-NLS-1$
++                if (tmpEnv.startsWith(tmpName + "=")) { //$NON-NLS-1$
 +                    found = true;
 +                } else {
 +                    i++;
 +                }
 +            }
 +            
 +            if (found) {
 +                result = new String[pEnv.length];
 +                System.arraycopy(pEnv, 0, result, 0, pEnv.length);
 +                if (null != pSeparator) {
 +                    result[i] = pEnv[i] + pSeparator + pValue;
 +                } else {
 +                    result[i] = pName + "=" + pValue; //$NON-NLS-1$
 +                }
 +                
 +            } else {
 +                result = new String[pEnv.length + 1];
 +                System.arraycopy(pEnv, 0, result, 0, pEnv.length);
 +                result[result.length - 1] = pName + "=" + pValue; //$NON-NLS-1$
 +            }
 +        } else {
 +            result [0] = pName + "=" + pValue; //$NON-NLS-1$
 +        }
 +        
 +        return result;
 +    }
 +    
 +    /**
 +     * @return the system environement variables
 +     */
 +    public static String[] getSystemEnvironement() {
 +        Set<Entry<String, String>> envSet = System.getenv().entrySet();
 +        String[] sysEnv = new String[envSet.size()];
 +        Iterator<Entry<String, String>> iter = envSet.iterator();
 +        int i = 0;
 +        while (iter.hasNext())  {
 +            Entry<String, String> entry = iter.next();
 +            sysEnv[i] = entry.getKey() + "=" + entry.getValue(); //$NON-NLS-1$
 +            i++;
 +        }
 +        return sysEnv;
 +    }
 +    
 +    /**
 +     * Run a shell command with the system environment and an optional execution 
 +     * directory.
 +     * 
 +     * @param pShellCommand the command to run
 +     * @param pExecDir the execution directory or <code>null</code> if none
 +     * @return the process for the running command
 +     * @throws IOException if anything wrong happens during the command launch
 +     */
 +    public static Process runToolWithSysEnv(String pShellCommand, File pExecDir) throws IOException {
 +        return runTool(pShellCommand, getSystemEnvironement(), pExecDir);
 +    }
 +    
 +    /**
 +     * Run a shell command with a given environment and an optional execution 
 +     * directory.
 +     * 
 +     * @param pShellCommand the command to run
 +     * @param pEnv the environment variables
 +     * @param pExecDir the execution directory or <code>null</code> if none
 +     * @return the process for the running command
 +     * @throws IOException if anything wrong happens during the command launch
 +     */
 +    public static Process runTool(String pShellCommand, String[] pEnv, File pExecDir) throws IOException {
 +        String[] command = new String[COMMAND_ARGS_LENGTH];
 +        
 +        if (Platform.getOS().equals(Platform.OS_WIN32)) {
 +            String osName = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
 +            if (osName.startsWith("windows 9")) { //$NON-NLS-1$
 +                command[0] = "command.com"; //$NON-NLS-1$
 +            } else {
 +                command[0] = "cmd.exe"; //$NON-NLS-1$
 +            }
 +            
 +            command[1] = "/C"; //$NON-NLS-1$
 +            command[2] = pShellCommand;
 +        } else {
 +            command[0] = "sh"; //$NON-NLS-1$
 +            command[1] = "-c"; //$NON-NLS-1$
 +            command[2] = pShellCommand;
 +        }
 +        
 +        String execPath = ""; //$NON-NLS-1$
 +        if (pExecDir != null) {
 +            execPath = " from dir: "; //$NON-NLS-1$
 +            execPath += pExecDir.getAbsolutePath();
 +        }
 +        PluginLogger.debug("Running command: " + pShellCommand +  //$NON-NLS-1$
 +                " with env: " + Arrays.toString(pEnv) +  //$NON-NLS-1$
 +                execPath);
 +        Process process = null;
 +        if (pExecDir != null) {
 +            process = Runtime.getRuntime().exec(command, pEnv, pExecDir);
 +        } else {
 +            process = Runtime.getRuntime().exec(command, pEnv);
 +        }
 +        return process;
 +    }
 +}
diff --cc cpp/META-INF/MANIFEST.MF
index d34e5c3,098ff48..646386b
--- a/cpp/META-INF/MANIFEST.MF
+++ b/cpp/META-INF/MANIFEST.MF
@@@ -14,6 -14,6 +14,7 @@@ Require-Bundle: org.eclipse.ui
   org.eclipse.cdt.ui;bundle-version="5.1.0",
   org.eclipse.ui.ide;bundle-version="3.5.0",
   org.eclipse.ui.cheatsheets,
-  org.openoffice.ide.packager.core;bundle-version="0.1.0"
++ org.openoffice.ide.packager.core;bundle-version="0.1.0",
+  org.eclipse.debug.core
  Bundle-RequiredExecutionEnvironment: J2SE-1.5
  Bundle-ActivationPolicy: lazy
diff --cc cpp/build/MANIFEST.MF.in
index 03a0cd1,f30c0b3..782c1cc
--- a/cpp/build/MANIFEST.MF.in
+++ b/cpp/build/MANIFEST.MF.in
@@@ -5,7 -5,7 +5,6 @@@ Bundle-SymbolicName: org.openoffice.ide
  Bundle-Version: @VERSION@
  Bundle-Activator: org.openoffice.ide.eclipse.cpp.Activator
  Bundle-Vendor: Cédric Bosdonnat
--Bundle-Localization: plugin
  Require-Bundle: org.eclipse.ui,
   org.eclipse.core.runtime,
   org.openoffice.ide.eclipse.core;bundle-version="1.1.0",
@@@ -14,6 -14,6 +13,8 @@@
   org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.1",
   org.eclipse.cdt.ui,
   org.eclipse.ui.ide,
-- org.eclipse.ui.cheatsheets
++ org.eclipse.ui.cheatsheets,
++ org.openoffice.ide.packager.core;bundle-version="0.1.0",
++ org.eclipse.debug.core
  Bundle-RequiredExecutionEnvironment: J2SE-1.5
  Bundle-ActivationPolicy: lazy
diff --cc java/META-INF/MANIFEST.MF
index 6db7b2c,fb7e6d7..ebcc86d
--- a/java/META-INF/MANIFEST.MF
+++ b/java/META-INF/MANIFEST.MF
@@@ -17,6 -16,6 +16,7 @@@ Require-Bundle: org.eclipse.ui
   org.eclipse.jdt.junit;bundle-version="3.5.0",
   org.eclipse.ui.ide,
   org.eclipse.ui.cheatsheets,
-  org.openoffice.ide.packager.core;bundle-version="0.1.0"
++ org.openoffice.ide.packager.core;bundle-version="0.1.0",
+  org.eclipse.jdt.debug.ui;bundle-version="3.4.1"
  Bundle-ActivationPolicy: lazy
  Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --cc java/build/MANIFEST.MF.in
index d6bfd41,38d5ac1..8623c68
--- a/java/build/MANIFEST.MF.in
+++ b/java/build/MANIFEST.MF.in
@@@ -4,9 -4,8 +4,8 @@@ Bundle-Name: Java Plug-in for OOEclips
  Bundle-SymbolicName: org.openoffice.ide.eclipse.java; singleton:=true
  Bundle-Version: @VERSION@
  Bundle-Activator: org.openoffice.ide.eclipse.java.OOoJavaPlugin
 -Bundle-Vendor: OpenOffice.org
 +Bundle-Vendor: Cédric Bosdonnat
  Require-Bundle: org.eclipse.ui,
-  org.eclipse.core.runtime,
   org.openoffice.ide.eclipse.core,
   org.eclipse.core.resources,
   org.eclipse.jdt.core,
@@@ -16,6 -15,8 +15,9 @@@
   org.eclipse.jface.text,
   org.eclipse.jdt.junit;bundle-version="3.5.0",
   org.eclipse.ui.ide,
-  org.eclipse.ui.cheatsheets
+  org.eclipse.ui.cheatsheets,
++ org.openoffice.ide.packager.core;bundle-version="0.1.0",
+  org.eclipse.jdt.debug.ui;bundle-version="3.4.1"
  Bundle-ActivationPolicy: lazy
  Bundle-RequiredExecutionEnvironment: J2SE-1.5
+ 
commit ad40506a82ea5e77e27ccc3d9ef95fe6490873c4
Author: cdan <cdan at savatech.ro>
Date:   Wed Jun 23 13:57:02 2010 +0300

    Use proper logging.

diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
index 16d83b1..866c008 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
@@ -173,8 +173,8 @@ public class OfficeLaunchDelegate extends LaunchConfigurationDelegate {
                 env = SystemHelper.addEnv(env, "PATH", 
                                 programFolder.getAbsolutePath(), pathsep); //$NON-NLS-1$
                 
-                System.err.println("Sourcing: " + shellCommand);
-                System.err.println("Sourcing.env: " + Arrays.toString(env));
+                PluginLogger.info("Sourcing: " + shellCommand);
+                PluginLogger.info("Sourcing.env: " + Arrays.toString(env));
                 
                 Process process = SystemHelper.runTool(shellCommand, env, null);
                 try {
commit cf6f78094be72d7203c80f26aede7f879a9fa6b2
Author: cdan <cdan at savatech.ro>
Date:   Tue Jun 22 20:33:39 2010 +0300

    Fixed the MANIFEST.MF.IN files

diff --git a/core/META-INF/MANIFEST.MF b/core/META-INF/MANIFEST.MF
index daaa0a7..94a3b5f 100644
--- a/core/META-INF/MANIFEST.MF
+++ b/core/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.openoffice.ide.eclipse.core; singleton:=true
 Bundle-Version: 1.2.0
 Bundle-Activator: org.openoffice.ide.eclipse.core.OOEclipsePlugin
 Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
+Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,
  org.eclipse.jface.text,
  org.eclipse.core.resources,
  org.eclipse.ui.editors,
@@ -16,7 +16,7 @@ Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.help,
  org.eclipse.ui.forms,
  org.junit,
- org.eclipse.debug.core,
+ org.eclipse.debug.core;visibility:=reexport,
  org.eclipse.debug.ui,
  org.eclipse.ui;bundle-version="3.4.1",
  javax.xml;bundle-version="1.3.4"
diff --git a/core/build/MANIFEST.MF.in b/core/build/MANIFEST.MF.in
index 6930839..dd692ce 100644
--- a/core/build/MANIFEST.MF.in
+++ b/core/build/MANIFEST.MF.in
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.openoffice.ide.eclipse.core; singleton:=true
 Bundle-Version: @VERSION@
 Bundle-Activator: org.openoffice.ide.eclipse.core.OOEclipsePlugin
 Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
+Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,
  org.eclipse.jface.text,
  org.eclipse.core.resources,
  org.eclipse.ui.editors,
@@ -16,10 +16,10 @@ Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.help,
  org.eclipse.ui.forms,
  org.junit,
- org.eclipse.debug.core,
+ org.eclipse.debug.core;visibility:=reexport,
  org.eclipse.debug.ui,
- org.eclipse.ui,
- javax.xml
+ org.eclipse.ui;bundle-version="3.4.1",
+ javax.xml;bundle-version="1.3.4"
 Bundle-ActivationPolicy: lazy
 Export-Package: org.openoffice.ide.eclipse.core,
  org.openoffice.ide.eclipse.core.actions,
diff --git a/java/META-INF/MANIFEST.MF b/java/META-INF/MANIFEST.MF
index 14d4005..fb7e6d7 100644
--- a/java/META-INF/MANIFEST.MF
+++ b/java/META-INF/MANIFEST.MF
@@ -6,7 +6,6 @@ Bundle-Version: 1.0.0
 Bundle-Activator: org.openoffice.ide.eclipse.java.OOoJavaPlugin
 Bundle-Vendor: OpenOffice.org
 Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
  org.openoffice.ide.eclipse.core,
  org.eclipse.core.resources,
  org.eclipse.jdt.core,
@@ -17,7 +16,6 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.jdt.junit;bundle-version="3.5.0",
  org.eclipse.ui.ide,
  org.eclipse.ui.cheatsheets,
- org.eclipse.debug.core,
  org.eclipse.jdt.debug.ui;bundle-version="3.4.1"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/java/build/MANIFEST.MF.in b/java/build/MANIFEST.MF.in
index 4de34bf..38d5ac1 100644
--- a/java/build/MANIFEST.MF.in
+++ b/java/build/MANIFEST.MF.in
@@ -6,7 +6,6 @@ Bundle-Version: @VERSION@
 Bundle-Activator: org.openoffice.ide.eclipse.java.OOoJavaPlugin
 Bundle-Vendor: OpenOffice.org
 Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
  org.openoffice.ide.eclipse.core,
  org.eclipse.core.resources,
  org.eclipse.jdt.core,
@@ -16,6 +15,8 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.jface.text,
  org.eclipse.jdt.junit;bundle-version="3.5.0",
  org.eclipse.ui.ide,
- org.eclipse.ui.cheatsheets
+ org.eclipse.ui.cheatsheets,
+ org.eclipse.jdt.debug.ui;bundle-version="3.4.1"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
commit de6a8f16569b58020481138aaa12a8bd3084a81e
Author: cdan <cdan at savatech.ro>
Date:   Sat Jun 19 19:16:35 2010 +0300

    A first usable OpenOffice launch/debug configuration type.

diff --git a/core/.project b/core/.project
old mode 100755
new mode 100644
index d640f8f..1fd0fc3
--- a/core/.project
+++ b/core/.project
@@ -1,40 +1,40 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.openoffice.ide.eclipse.core</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.wst.common.project.facet.core.builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<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>net.sf.eclipsecs.core.CheckstyleBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
-		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
-	</natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.openoffice.ide.eclipse.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<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>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+	</natures>
+</projectDescription>
diff --git a/core/META-INF/MANIFEST.MF b/core/META-INF/MANIFEST.MF
old mode 100755
new mode 100644
index c30f0a0..daaa0a7
--- a/core/META-INF/MANIFEST.MF
+++ b/core/META-INF/MANIFEST.MF
@@ -33,11 +33,13 @@ Export-Package: org.openoffice.ide.eclipse.core,
  org.openoffice.ide.eclipse.core.editors.utils,
  org.openoffice.ide.eclipse.core.gui,
  org.openoffice.ide.eclipse.core.gui.rows,
+ org.openoffice.ide.eclipse.core.helpers,
  org.openoffice.ide.eclipse.core.i18n,
  org.openoffice.ide.eclipse.core.internal.helpers;x-internal:=true,
  org.openoffice.ide.eclipse.core.internal.model;x-internal:=true,
  org.openoffice.ide.eclipse.core.internal.office;x-internal:=true,
  org.openoffice.ide.eclipse.core.launch,
+ org.openoffice.ide.eclipse.core.launch.office,
  org.openoffice.ide.eclipse.core.model,
  org.openoffice.ide.eclipse.core.model.config,
  org.openoffice.ide.eclipse.core.model.description,
diff --git a/core/build/MANIFEST.MF.in b/core/build/MANIFEST.MF.in
old mode 100755
new mode 100644
index ce80bd2..6930839
--- a/core/build/MANIFEST.MF.in
+++ b/core/build/MANIFEST.MF.in
@@ -33,11 +33,13 @@ Export-Package: org.openoffice.ide.eclipse.core,
  org.openoffice.ide.eclipse.core.editors.utils,
  org.openoffice.ide.eclipse.core.gui,
  org.openoffice.ide.eclipse.core.gui.rows,
+ org.openoffice.ide.eclipse.core.helpers,
  org.openoffice.ide.eclipse.core.i18n,
  org.openoffice.ide.eclipse.core.internal.helpers;x-internal:=true,
  org.openoffice.ide.eclipse.core.internal.model;x-internal:=true,
  org.openoffice.ide.eclipse.core.internal.office;x-internal:=true,
  org.openoffice.ide.eclipse.core.launch,
+ org.openoffice.ide.eclipse.core.launch.office,
  org.openoffice.ide.eclipse.core.model,
  org.openoffice.ide.eclipse.core.model.config,
  org.openoffice.ide.eclipse.core.model.description,
diff --git a/core/plugin.xml b/core/plugin.xml
old mode 100755
new mode 100644
index f78f49a..af031cb
--- a/core/plugin.xml
+++ b/core/plugin.xml
@@ -265,8 +265,10 @@
             name="URE Application"/>
       <launchConfigurationType
             delegate="org.openoffice.ide.eclipse.core.launch.office.OfficeLaunchDelegate"
+            delegateDescription="The Open Office launcher supports running and remote debugging Open Office extensions."
+            delegateName="Open Office Launcher"
             id="org.openoffice.ide.eclipse.core.launchOpenOffice"
-            modes="run"
+            modes="run,debug"
             name="Open Office Application">
       </launchConfigurationType>
    </extension>
diff --git a/core/source/org/openoffice/ide/eclipse/core/helpers/SystemHelper.java b/core/source/org/openoffice/ide/eclipse/core/helpers/SystemHelper.java
new file mode 100644
index 0000000..9c6893b
--- /dev/null
+++ b/core/source/org/openoffice/ide/eclipse/core/helpers/SystemHelper.java
@@ -0,0 +1,224 @@
+/*************************************************************************
+ *
+ * $RCSfile: SystemHelper.java,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: cedricbosdo $ $Date: 2007/11/25 20:32:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * the GNU Lesser General Public License Version 2.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ * 
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
+ *
+ * Copyright: 2002 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): Cedric Bosdonnat
+ *
+ *
+ ************************************************************************/
+package org.openoffice.ide.eclipse.core.helpers;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.openoffice.ide.eclipse.core.PluginLogger;
+
+/**
+ * Helper class for system variables handling.
+ * 
+ * @author cedricbosdo
+ *
+ */
+public class SystemHelper {
+    
+    public static final String PATH_SEPARATOR = System.getProperty("path.separator"); //$NON-NLS-1$
+    
+    private static final int COMMAND_ARGS_LENGTH = 3;
+
+    /**
+     * Add an environment variable to an array of existing variables.
+     * 
+     * @param pEnv the array of existing environment variables where to add the
+     *         new variable
+     * @param pName the name of the variable to add
+     * @param pValue    the value of the variable to add
+     * 
+     * @return the completed array
+     */
+    public static String[] addPathEnv( String[] pEnv, String pName, String[] pValue ) {
+        
+        String values = new String();
+        for (int i = 0; i < pValue.length; i++) {
+            String path = pValue[i];
+            String tmpValue = new Path(path).toOSString();
+            if (i < pValue.length - 1) {
+                tmpValue += PATH_SEPARATOR;
+            }
+            values += tmpValue;
+        }
+        
+        return addEnv( pEnv, pName, values, PATH_SEPARATOR );
+    }
+    
+    /**
+     * Add an environment variable to an array of existing variables.
+     * 
+     * @param pEnv the array of existing environment variables where to add the
+     *         new variable
+     * @param pName the name of the variable to add
+     * @param pValue    the value of the variable to add
+     * @param pSeparator the separator to use if there is already a variable with
+     *         the same name. If <code>null</code>, the old variable will be replaced
+     * 
+     * @return the completed array
+     */
+    public static String[] addEnv(String[] pEnv, String pName, String pValue,
+            String pSeparator) {
+        //TODO cdan should add a test for this method (test that the case is preserved even on windows, but compare with ignoring case on windows) 
+        String[] result = new String[1];  
+        
+        if (pEnv != null) { 
+            int i = 0;
+            boolean found = false;
+            
+            while (!found && i < pEnv.length) {
+                String tmpEnv = pEnv[i];
+                String tmpName = pName;
+                if (Platform.getOS().equals(Platform.OS_WIN32)) {
+                    tmpEnv = tmpEnv.toLowerCase();
+                    tmpName = pName.toLowerCase();
+                }
+                if (tmpEnv.startsWith(tmpName + "=")) { //$NON-NLS-1$
+                    found = true;
+                } else {
+                    i++;
+                }
+            }
+            
+            if (found) {
+                result = new String[pEnv.length];
+                System.arraycopy(pEnv, 0, result, 0, pEnv.length);
+                if (null != pSeparator) {
+                    result[i] = pEnv[i] + pSeparator + pValue;
+                } else {
+                    result[i] = pName + "=" + pValue; //$NON-NLS-1$
+                }
+                
+            } else {
+                result = new String[pEnv.length + 1];
+                System.arraycopy(pEnv, 0, result, 0, pEnv.length);
+                result[result.length - 1] = pName + "=" + pValue; //$NON-NLS-1$
+            }
+        } else {
+            result [0] = pName + "=" + pValue; //$NON-NLS-1$
+        }
+        
+        return result;
+    }
+    
+    /**
+     * @return the system environement variables
+     */
+    public static String[] getSystemEnvironement() {
+        Set<Entry<String, String>> envSet = System.getenv().entrySet();
+        String[] sysEnv = new String[envSet.size()];
+        Iterator<Entry<String, String>> iter = envSet.iterator();
+        int i = 0;
+        while (iter.hasNext())  {
+            Entry<String, String> entry = iter.next();
+            sysEnv[i] = entry.getKey() + "=" + entry.getValue(); //$NON-NLS-1$
+            i++;
+        }
+        return sysEnv;
+    }
+    
+    /**
+     * Run a shell command with the system environment and an optional execution 
+     * directory.
+     * 
+     * @param pShellCommand the command to run
+     * @param pExecDir the execution directory or <code>null</code> if none
+     * @return the process for the running command
+     * @throws IOException if anything wrong happens during the command launch
+     */
+    public static Process runToolWithSysEnv(String pShellCommand, File pExecDir) throws IOException {
+        return runTool(pShellCommand, getSystemEnvironement(), pExecDir);
+    }
+    
+    /**
+     * Run a shell command with a given environment and an optional execution 
+     * directory.
+     * 
+     * @param pShellCommand the command to run
+     * @param pEnv the environment variables
+     * @param pExecDir the execution directory or <code>null</code> if none
+     * @return the process for the running command
+     * @throws IOException if anything wrong happens during the command launch
+     */
+    public static Process runTool(String pShellCommand, String[] pEnv, File pExecDir) throws IOException {
+        String[] command = new String[COMMAND_ARGS_LENGTH];
+        
+        if (Platform.getOS().equals(Platform.OS_WIN32)) {
+            String osName = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
+            if (osName.startsWith("windows 9")) { //$NON-NLS-1$
+                command[0] = "command.com"; //$NON-NLS-1$
+            } else {
+                command[0] = "cmd.exe"; //$NON-NLS-1$
+            }
+            
+            command[1] = "/C"; //$NON-NLS-1$
+            command[2] = pShellCommand;
+        } else {
+            command[0] = "sh"; //$NON-NLS-1$
+            command[1] = "-c"; //$NON-NLS-1$
+            command[2] = pShellCommand;
+        }
+        
+        String execPath = ""; //$NON-NLS-1$
+        if (pExecDir != null) {
+            execPath = " from dir: "; //$NON-NLS-1$
+            execPath += pExecDir.getAbsolutePath();
+        }
+        PluginLogger.debug("Running command: " + pShellCommand +  //$NON-NLS-1$
+                " with env: " + Arrays.toString(pEnv) +  //$NON-NLS-1$
+                execPath);
+        Process process = null;
+        if (pExecDir != null) {
+            process = Runtime.getRuntime().exec(command, pEnv, pExecDir);
+        } else {
+            process = Runtime.getRuntime().exec(command, pEnv);
+        }
+        return process;
+    }
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/helpers/SystemHelper.java b/core/source/org/openoffice/ide/eclipse/core/internal/helpers/SystemHelper.java
deleted file mode 100644
index 511867c..0000000
--- a/core/source/org/openoffice/ide/eclipse/core/internal/helpers/SystemHelper.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*************************************************************************
- *
- * $RCSfile: SystemHelper.java,v $
- *
- * $Revision: 1.4 $
- *
- * last change: $Author: cedricbosdo $ $Date: 2007/11/25 20:32:31 $
- *
- * The Contents of this file are made available subject to the terms of
- * the GNU Lesser General Public License Version 2.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- * 
- * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
- *
- * Copyright: 2002 by Sun Microsystems, Inc.
- *
- * All Rights Reserved.
- *
- * Contributor(s): Cedric Bosdonnat
- *
- *
- ************************************************************************/
-package org.openoffice.ide.eclipse.core.internal.helpers;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Map.Entry;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.openoffice.ide.eclipse.core.PluginLogger;
-
-/**
- * Helper class for system variables handling.
- * 
- * @author cedricbosdo
- *
- */
-public class SystemHelper {
-    
-    public static final String PATH_SEPARATOR = System.getProperty("path.separator"); //$NON-NLS-1$
-    
-    private static final int COMMAND_ARGS_LENGTH = 3;
-
-    /**
-     * Add an environment variable to an array of existing variables.
-     * 
-     * @param pEnv the array of existing environment variables where to add the
-     *         new variable
-     * @param pName the name of the variable to add
-     * @param pValue    the value of the variable to add
-     * 
-     * @return the completed array
-     */
-    public static String[] addPathEnv( String[] pEnv, String pName, String[] pValue ) {
-        
-        String values = new String();
-        for (int i = 0; i < pValue.length; i++) {
-            String path = pValue[i];
-            String tmpValue = new Path(path).toOSString();
-            if (i < pValue.length - 1) {
-                tmpValue += PATH_SEPARATOR;
-            }
-            values += tmpValue;
-        }
-        
-        return addEnv( pEnv, pName, values, PATH_SEPARATOR );
-    }
-    
-    /**
-     * Add an environment variable to an array of existing variables.
-     * 
-     * @param pEnv the array of existing environment variables where to add the
-     *         new variable
-     * @param pName the name of the variable to add
-     * @param pValue    the value of the variable to add
-     * @param pSeparator the separator to use if there is already a variable with
-     *         the same name. If <code>null</code>, the old variable will be replaced
-     * 
-     * @return the completed array
-     */
-    public static String[] addEnv(String[] pEnv, String pName, String pValue,
-            String pSeparator) {
-        
-        String[] result = new String[1];  
-        
-        if (pEnv != null) { 
-            int i = 0;
-            boolean found = false;
-            
-            while (!found && i < pEnv.length) {
-                String tmpEnv = pEnv[i]; 
-                if (Platform.getOS().equals(Platform.OS_WIN32)) {
-                    tmpEnv = tmpEnv.toLowerCase();
-                    pName = pName.toLowerCase();
-                }
-                if (tmpEnv.startsWith(pName + "=")) { //$NON-NLS-1$
-                    found = true;
-                } else {
-                    i++;
-                }
-            }
-            
-            if (found) {
-                result = new String[pEnv.length];
-                System.arraycopy(pEnv, 0, result, 0, pEnv.length);
-                if (null != pSeparator) {
-                    result[i] = pEnv[i] + pSeparator + pValue;
-                } else {
-                    result[i] = pName + "=" + pValue; //$NON-NLS-1$
-                }
-                
-            } else {
-                result = new String[pEnv.length + 1];
-                System.arraycopy(pEnv, 0, result, 0, pEnv.length);
-                result[result.length - 1] = pName + "=" + pValue; //$NON-NLS-1$
-            }
-        } else {
-            result [0] = pName + "=" + pValue; //$NON-NLS-1$
-        }
-        
-        return result;
-    }
-    
-    /**
-     * @return the system environement variables
-     */
-    public static String[] getSystemEnvironement() {
-        Set<Entry<String, String>> envSet = System.getenv().entrySet();
-        String[] sysEnv = new String[envSet.size()];
-        Iterator<Entry<String, String>> iter = envSet.iterator();
-        int i = 0;
-        while (iter.hasNext())  {
-            Entry<String, String> entry = iter.next();
-            sysEnv[i] = entry.getKey() + "=" + entry.getValue(); //$NON-NLS-1$
-            i++;
-        }
-        return sysEnv;
-    }
-    
-    /**
-     * Run a shell command with the system environment and an optional execution 
-     * directory.
-     * 
-     * @param pShellCommand the command to run
-     * @param pExecDir the execution directory or <code>null</code> if none
-     * @return the process for the running command
-     * @throws IOException if anything wrong happens during the command launch
-     */
-    public static Process runToolWithSysEnv(String pShellCommand, File pExecDir) throws IOException {
-        return runTool(pShellCommand, getSystemEnvironement(), pExecDir);
-    }
-    
-    /**
-     * Run a shell command with a given environment and an optional execution 
-     * directory.
-     * 
-     * @param pShellCommand the command to run
-     * @param pEnv the environment variables
-     * @param pExecDir the execution directory or <code>null</code> if none
-     * @return the process for the running command
-     * @throws IOException if anything wrong happens during the command launch
-     */
-    public static Process runTool(String pShellCommand, String[] pEnv, File pExecDir) throws IOException {
-        String[] command = new String[COMMAND_ARGS_LENGTH];
-        
-        if (Platform.getOS().equals(Platform.OS_WIN32)) {
-            String osName = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
-            if (osName.startsWith("windows 9")) { //$NON-NLS-1$
-                command[0] = "command.com"; //$NON-NLS-1$
-            } else {
-                command[0] = "cmd.exe"; //$NON-NLS-1$
-            }
-            
-            command[1] = "/C"; //$NON-NLS-1$
-            command[2] = pShellCommand;
-        } else {
-            command[0] = "sh"; //$NON-NLS-1$
-            command[1] = "-c"; //$NON-NLS-1$
-            command[2] = pShellCommand;
-        }
-        
-        String execPath = ""; //$NON-NLS-1$
-        if (pExecDir != null) {
-            execPath = " from dir: "; //$NON-NLS-1$
-            execPath += pExecDir.getAbsolutePath();
-        }
-        PluginLogger.debug("Running command: " + pShellCommand +  //$NON-NLS-1$
-                " with env: " + Arrays.toString(pEnv) +  //$NON-NLS-1$
-                execPath);
-        Process process = null;
-        if (pExecDir != null) {
-            process = Runtime.getRuntime().exec(command, pEnv, pExecDir);
-        } else {
-            process = Runtime.getRuntime().exec(command, pEnv);
-        }
-        return process;
-    }
-}
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java b/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java
index f9690fa..b2fe9dc 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java
@@ -104,8 +104,8 @@ public class UnoidlProjectHelper {
     public static final String IDL_BASIS = "/idl"; //$NON-NLS-1$
 
     public static final String DIST_BASIS = "dist"; //$NON-NLS-1$
-
-    public static final String OO_PROFILE_BASIS = ".ooo-debug"; //$NON-NLS-1$
+    
+    public static final String OO_PROFILE_BASIS = ".ooo-debug";
     
     /**
      * Create a default configuration file for UNO-IDL projects.
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
index a8d8a26..d3ff6b6 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
@@ -48,6 +48,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringWriter;
 import java.net.URI;
+import java.net.URISyntaxException;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -60,57 +61,61 @@ import org.eclipse.debug.core.ILaunch;
 import org.eclipse.swt.graphics.Image;
 import org.openoffice.ide.eclipse.core.PluginLogger;
 import org.openoffice.ide.eclipse.core.gui.ITableElement;
-import org.openoffice.ide.eclipse.core.internal.helpers.SystemHelper;
+import org.openoffice.ide.eclipse.core.helpers.SystemHelper;
 import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
 import org.openoffice.ide.eclipse.core.model.OOoContainer;
+import org.openoffice.ide.eclipse.core.model.config.IExtraOptionsProvider;
 import org.openoffice.ide.eclipse.core.model.config.IOOo;
 import org.openoffice.ide.eclipse.core.model.config.InvalidConfigException;
 
 /**
- * Helper class to add the table element features to the OOo classes. All the
- * {@link IOOo} interface still has to be implemented by the subclasses
+ * Helper class to add the table element features to the OOo classes. All the {@link IOOo} interface still has to be
+ * implemented by the subclasses
  * 
  * @author cbosdonnat
- *
+ * 
  */
 public abstract class AbstractOOo implements IOOo, ITableElement {
 
     public static final String NAME = "__ooo_name"; //$NON-NLS-1$
-    
+
     public static final String PATH = "__ooo_path"; //$NON-NLS-1$
 
     protected static final String FILE_SEP = System.getProperty("file.separator"); //$NON-NLS-1$
-    
+
     private static String sPlatform;
-    
+
     private String mHome;
     private String mName;
-    
+
     /**
      * Creating a new OOo or URE instance specifying its home directory.
      * 
-     * @param pOooHome the OpenOffice.org or URE home directory
-     * @throws InvalidConfigException is thrown if the home directory doesn't
-     *         contains the required files and directories
+     * @param pOooHome
+     *            the OpenOffice.org or URE home directory
+     * @throws InvalidConfigException
+     *             is thrown if the home directory doesn't contains the required files and directories
      */
     public AbstractOOo(String pOooHome) throws InvalidConfigException {
         setHome(pOooHome);
     }
-    
+
     /**
      * Creating a new OOo or URE instance specifying its home directory and name.
      * 
-     * @param pOooHome the OpenOffice.org or URE installation directory
-     * @param pName the OpenOffice.org or URE instance name
+     * @param pOooHome
+     *            the OpenOffice.org or URE installation directory
+     * @param pName
+     *            the OpenOffice.org or URE instance name
      * 
-     * @throws InvalidConfigException if the home directory doesn't
-     *         contains the required files and directories
+     * @throws InvalidConfigException
+     *             if the home directory doesn't contains the required files and directories
      */
     public AbstractOOo(String pOooHome, String pName) throws InvalidConfigException {
         setHome(pOooHome);
         setName(pName);
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -118,120 +123,110 @@ public abstract class AbstractOOo implements IOOo, ITableElement {
 
         Path homePath = new Path(pHome);
         File homeFile = homePath.toFile();
-        
+
         /* Checks if the directory exists */
         if (!homeFile.isDirectory() || !homeFile.canRead()) {
             mHome = null;
-            throw new InvalidConfigException(
-                Messages.getString("AbstractOOo.NoDirectoryError") +  //$NON-NLS-1$
-                        homeFile.getAbsolutePath(), 
-                InvalidConfigException.INVALID_OOO_HOME);
+            throw new InvalidConfigException(Messages.getString("AbstractOOo.NoDirectoryError") + //$NON-NLS-1$
+                            homeFile.getAbsolutePath(), InvalidConfigException.INVALID_OOO_HOME);
         }
-        
+
         mHome = pHome;
-            
+
         /* Checks if the classes paths are directories */
         checkClassesDir();
-        
+
         /* Checks if types registries are readable files */
         checkTypesRdb();
-        
+
         /* Checks if services.rdb is a readable file */
         checkServicesRdb();
-        
+
         /* Checks if unorc is a readable file */
         checkUnoIni();
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String getHome() {
         return mHome;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String getName() {
         return mName;
     }
-    
+
     /**
-     * Set the new name only if it's neither null nor the empty string. The name
-     * will be rendered unique and therefore may be changed.
+     * Set the new name only if it's neither null nor the empty string. The name will be rendered unique and therefore
+     * may be changed.
      * 
-     * @param pName the name to set
+     * @param pName
+     *            the name to set
      */
     protected void setName(String pName) {
         if (pName != null && !pName.equals("")) { //$NON-NLS-1$
             mName = OOoContainer.getUniqueName(pName);
         }
     }
-    
+
     /**
-     * Check if the UNO configuration file is present in the OOo
-     * installation directory.
+     * Check if the UNO configuration file is present in the OOo installation directory.
      * 
-     * @throws InvalidConfigException if the UNO configuration file
-     *      isn't present.
+     * @throws InvalidConfigException
+     *             if the UNO configuration file isn't present.
      */
     private void checkUnoIni() throws InvalidConfigException {
         Path unorcPath = new Path(getUnorcPath());
         File unorcFile = unorcPath.toFile();
-        
+
         if (!unorcFile.isFile() || !unorcFile.canRead()) {
             mHome = null;
-            throw new InvalidConfigException(
-                Messages.getString("AbstractOOo.NoFileError") +  //$NON-NLS-1$
-                        unorcFile.getAbsolutePath(), 
-                InvalidConfigException.INVALID_OOO_HOME);
+            throw new InvalidConfigException(Messages.getString("AbstractOOo.NoFileError") + //$NON-NLS-1$
+                            unorcFile.getAbsolutePath(), InvalidConfigException.INVALID_OOO_HOME);
         }
     }
 
     /**
-     * Check if the <code>services.rdb</code> file is present in the OOo
-     * installation directory.
+     * Check if the <code>services.rdb</code> file is present in the OOo installation directory.
      * 
-     * @throws InvalidConfigException if the <code>services.rdb</code> file
-     *      isn't present
+     * @throws InvalidConfigException
+     *             if the <code>services.rdb</code> file isn't present
      */
     private void checkServicesRdb() throws InvalidConfigException {
         String[] paths = getServicesPath();
-        
+
         for (String path : paths) {
             Path servicesPath = new Path(path);
             File servicesFile = servicesPath.toFile();
-            
+
             if (!servicesFile.isFile() || !servicesFile.canRead()) {
                 mHome = null;
-                throw new InvalidConfigException(
-                    Messages.getString("AbstractOOo.NoFileError") +  //$NON-NLS-1$
-                            servicesFile.getAbsolutePath(), 
-                    InvalidConfigException.INVALID_OOO_HOME);
-            }   
+                throw new InvalidConfigException(Messages.getString("AbstractOOo.NoFileError") + //$NON-NLS-1$
+                                servicesFile.getAbsolutePath(), InvalidConfigException.INVALID_OOO_HOME);
+            }
         }
     }
 
     /**
-     * Check if the <code>types.rdb</code> file is present in the OOo
-     * installation directory.
+     * Check if the <code>types.rdb</code> file is present in the OOo installation directory.
      * 
-     * @throws InvalidConfigException if the <code>types.rdb</code> file
-     *      isn't present
+     * @throws InvalidConfigException
+     *             if the <code>types.rdb</code> file isn't present
      */
     private void checkTypesRdb() throws InvalidConfigException {
         String[] paths = getTypesPath();
         for (String path : paths) {
             Path typesPath = new Path(path);
             File typesFile = typesPath.toFile();
-            
+
             if (!typesFile.isFile() || !typesFile.canRead()) {
                 mHome = null;
-                throw new InvalidConfigException(
-                    Messages.getString("AbstractOOo.NoFileError") +  //$NON-NLS-1$
-                            typesFile.getAbsolutePath(), 
-                    InvalidConfigException.INVALID_OOO_HOME);
+                throw new InvalidConfigException(Messages.getString("AbstractOOo.NoFileError") + //$NON-NLS-1$
+                                typesFile.getAbsolutePath(), InvalidConfigException.INVALID_OOO_HOME);
             }
         }
     }
@@ -239,26 +234,25 @@ public abstract class AbstractOOo implements IOOo, ITableElement {
     /**
      * Check if the classes directory exits in the OOo installation folder.
      * 
-     * @throws InvalidConfigException if the classes directory can't be found
+     * @throws InvalidConfigException
+     *             if the classes directory can't be found
      */
     private void checkClassesDir() throws InvalidConfigException {
         String[] paths = getClassesPath();
         for (String path : paths) {
             Path javaPath = new Path(path);
             File javaDir = javaPath.toFile();
-            
+
             if (!javaDir.isDirectory() || !javaDir.canRead()) {
                 mHome = null;
-                throw new InvalidConfigException(
-                    Messages.getString("AbstractOOo.NoDirectoryError") +  //$NON-NLS-1$
-                            javaDir.getAbsolutePath(), 
-                    InvalidConfigException.INVALID_OOO_HOME);
-            }      
+                throw new InvalidConfigException(Messages.getString("AbstractOOo.NoDirectoryError") + //$NON-NLS-1$
+                                javaDir.getAbsolutePath(), InvalidConfigException.INVALID_OOO_HOME);
+            }
         }
     }
-    
-    //-------------------------------------------- ITableElement Implementation
-    
+
+    // -------------------------------------------- ITableElement Implementation
+
     /**
      * {@inheritDoc}
      */
@@ -283,7 +277,7 @@ public abstract class AbstractOOo implements IOOo, ITableElement {
      * {@inheritDoc}
      */
     public String[] getProperties() {
-        return new String[] {NAME, PATH};
+        return new String[] { NAME, PATH };
     }
 
     /**
@@ -306,73 +300,75 @@ public abstract class AbstractOOo implements IOOo, ITableElement {
     public void setValue(String pProperty, Object pValue) {
         // Nothing to do
     }
-    
+
     /**
-     * Run a UNO application using an implementation of the <code>XMain</code>
-     * interface.
+     * Run a UNO application using an implementation of the <code>XMain</code> interface.
      * 
-     * @param pPrj the UNO project to run
-     * @param pMain the fully qualified name of the main service to run
-     * @param pArgs the UNO program arguments
-     * @param pLaunch the Eclipse launch instance
-     * @param pMonitor the monitor reporting the run progress
+     * @param pPrj
+     *            the UNO project to run
+     * @param pMain
+     *            the fully qualified name of the main service to run
+     * @param pArgs
+     *            the UNO program arguments
+     * @param pLaunch
+     *            the Eclipse launch instance
+     * @param pMonitor
+     *            the monitor reporting the run progress
      */
-    public void runUno(IUnoidlProject pPrj, String pMain, String pArgs, 
-            ILaunch pLaunch, IProgressMonitor pMonitor) {
-        
+    public void runUno(IUnoidlProject pPrj, String pMain, String pArgs, ILaunch pLaunch, IProgressMonitor pMonitor) {
+
         String libpath = pPrj.getLanguage().getProjectHandler().getLibraryPath(pPrj);
         libpath = libpath.replace("\\", "/"); //$NON-NLS-1$ //$NON-NLS-2$
         libpath = libpath.replace(" ", "%20"); //$NON-NLS-1$ //$NON-NLS-2$
         libpath = "file:///" + libpath; //$NON-NLS-1$
-        
+
         String unoPath = getUnoPath();
         if (getPlatform().equals(Platform.OS_WIN32)) {
             /* uno is already in the PATH variable, so don't worry */
             unoPath = "uno"; //$NON-NLS-1$
         }
-        
-        String command = unoPath +
-            " -c " + pMain + //$NON-NLS-1$
-            " -l " + libpath +  //$NON-NLS-1$
-            " -- " + pArgs; //$NON-NLS-1$
-        
+
+        String command = unoPath + " -c " + pMain + //$NON-NLS-1$
+                        " -l " + libpath + //$NON-NLS-1$
+                        " -- " + pArgs; //$NON-NLS-1$
+
         String[] env = pPrj.getLanguage().getLanguageBuidler().getBuildEnv(pPrj);
-        
-        IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject( pPrj.getName() );
-        
+
+        IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject(pPrj.getName());
+
         if (getJavaldxPath() != null) {
-            Process p = pPrj.getSdk().runToolWithEnv(prj, 
-                    pPrj.getOOo(), getJavaldxPath(), env, pMonitor);
+            Process p = pPrj.getSdk().runToolWithEnv(prj, pPrj.getOOo(), getJavaldxPath(), env, pMonitor);
             InputStream out = p.getInputStream();
             StringWriter writer = new StringWriter();
-            
+
             try {
                 int c = out.read();
                 while (c != -1) {
                     writer.write(c);
                     c = out.read();
                 }
-            } catch (IOException e) {            
+            } catch (IOException e) {
             }
-            
+
             String libPath = writer.getBuffer().toString();
-            env = SystemHelper.addEnv(env, "LD_LIBRARY_PATH", libPath.trim(),  //$NON-NLS-1$
-                    System.getProperty("path.separator")); //$NON-NLS-1$
+            env = SystemHelper.addEnv(env, "LD_LIBRARY_PATH", libPath.trim(), //$NON-NLS-1$
+                            System.getProperty("path.separator")); //$NON-NLS-1$
         }
-        
+
         Process p = pPrj.getSdk().runToolWithEnv(prj, pPrj.getOOo(), command, env, pMonitor);
-        DebugPlugin.newProcess(pLaunch, p, Messages.getString("AbstractOOo.UreProcessName")  + pMain); //$NON-NLS-1$
+        DebugPlugin.newProcess(pLaunch, p, Messages.getString("AbstractOOo.UreProcessName") + pMain); //$NON-NLS-1$
     }
-    
-    public void runOpenOffice(IUnoidlProject pPrj, 
-            ILaunch pLaunch, IPath pUserInstallation, IProgressMonitor pMonitor) {
+
+    /**
+     * {@inheritDoc}
+     */
+    public void runOpenOffice(IUnoidlProject pPrj, ILaunch pLaunch, IPath pUserInstallation,
+                    IExtraOptionsProvider pExtraOptionsProvider, IProgressMonitor pMonitor) {
         try {
-            IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject(
-                    pPrj.getName());
-            String[] env = pPrj.getLanguage().getLanguageBuidler().getBuildEnv(
-                    pPrj);
+            IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject(pPrj.getName());
+            String[] env = pPrj.getLanguage().getLanguageBuidler().getBuildEnv(pPrj);
 
-            String pathSeparator = System.getProperty("path.separator"); //$NON-NLS-1$
+            String pathSeparator = System.getProperty("path.separator");
             String[] sPaths = pPrj.getOOo().getBinPath();
             StringBuilder sPathValue = new StringBuilder();
             for (String sPath : sPaths) {
@@ -380,43 +376,58 @@ public abstract class AbstractOOo implements IOOo, ITableElement {
                 sPathValue.append(pathSeparator);
             }
 
-            String command = "soffice.bin"; //$NON-NLS-1$
-            
-            env = SystemHelper.addEnv(env, "PATH", sPathValue.toString(), pathSeparator); //$NON-NLS-1$
-            if (null != pUserInstallation) {
-                // We have to turn the path to a URI something like file:///foo/bar/.ooo-debug
-                //TODO find a better way to get the proper URI.
-                URI userInstallationURI = new URI("file", new String(), //$NON-NLS-1$
-                        pUserInstallation.toFile().toURI().getPath(), null);
-                env = SystemHelper.addEnv(env, "UserInstallation", userInstallationURI.toString(), null); //$NON-NLS-1$
-                command += " -nofirststartwiozard "; //$NON-NLS-1$
-            }
+            String command = "soffice.bin";
 
-            PluginLogger.debug("Launching OpenOffice from commandline: " + command); //$NON-NLS-1$
-            Process p = pPrj.getSdk().runToolWithEnv(prj, pPrj.getOOo(),
-                    command, env, pMonitor);
-            DebugPlugin.newProcess(pLaunch, p, Messages
-                    .getString("AbstractOOo.OpenOfficeProcessName")); //$NON-NLS-1$
+            env = SystemHelper.addEnv(env, "PATH", sPathValue.toString(), pathSeparator);
+            env = addUserProfile(pUserInstallation, env);
+            env = pExtraOptionsProvider.addEnv(env);
+
+            PluginLogger.debug("Launching OpenOffice from commandline: " + command);
+            Process p = pPrj.getSdk().runToolWithEnv(prj, pPrj.getOOo(), command, env, pMonitor);
+            DebugPlugin.newProcess(pLaunch, p, Messages.getString("AbstractOOo.OpenOfficeProcessName")); //$NON-NLS-1$
         } catch (Exception e) {
+            e.printStackTrace();
             PluginLogger.error("Error running OpenOffice", e);
         }
     }
-    
+
+    /**
+     * Adds the proper env variables for the user profile.
+     * 
+     * @param pUserInstallation
+     *            the path to the user profile foldr.
+     * @param pEnv
+     *            the original env.
+     * @return the new env.
+     * @throws URISyntaxException
+     *             if something goes wrong.
+     */
+    protected String[] addUserProfile(IPath pUserInstallation, String[] pEnv) throws URISyntaxException {
+        if (null != pUserInstallation) {
+            // We have to turn the path to a URI something like file:///foo/bar/.ooo-debug
+            // TODO find a better way to get the proper URI.
+            URI userInstallationURI = new URI("file", "", pUserInstallation.toFile().toURI().getPath(), null);
+            pEnv = SystemHelper.addEnv(pEnv, "UserInstallation", userInstallationURI.toString(), null);
+        }
+        return pEnv;
+    }
+
     /**
      * Sets the target platform for tests.
      * 
-     * @param pPlatform the target platform
+     * @param pPlatform
+     *            the target platform
      */
-    public static void setPlatform( String pPlatform ) {
+    public static void setPlatform(String pPlatform) {
         sPlatform = pPlatform;
     }
-    
+
     /**
      * @return the system platform, or the test one if set.
      */
-    protected String getPlatform( ) {
+    protected String getPlatform() {
         String result = sPlatform;
-        if ( sPlatform == null) {
+        if (sPlatform == null) {
             result = Platform.getOS();
         }
         return result;
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
index 82897fc..c44d5f9 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
@@ -49,159 +49,162 @@ import java.io.InputStreamReader;
 import java.io.LineNumberReader;
 import java.util.Properties;
 
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.widgets.Display;
 import org.openoffice.ide.eclipse.core.PluginLogger;
-import org.openoffice.ide.eclipse.core.internal.helpers.SystemHelper;
+import org.openoffice.ide.eclipse.core.helpers.SystemHelper;
 import org.openoffice.ide.eclipse.core.model.config.InvalidConfigException;
 
 /**
  * Representing an OpenOffice.org instance for use in the UNO-IDL projects.
  * 
- * <p>An OpenOffice.org instance is recognized to the following files:
- *     <ul>
- *         <li><code>program/classes</code> directory</li>
- *         <li><code>program/types.rdb</code> registry</li>
- *         <li><code>program/bootstraprc</code> file</li>
- *     </ul>
+ * <p>
+ * An OpenOffice.org instance is recognized to the following files:
+ * <ul>
+ * <li><code>program/classes</code> directory</li>
+ * <li><code>program/types.rdb</code> registry</li>
+ * <li><code>program/bootstraprc</code> file</li>
+ * </ul>
  * </p>
  * 
- * <p>A MacOS installation of OpenOffice.org will have some different paths, and
- * of course the windows installation too. This class is used to abstract the 
- * platform OOo is installed on.</p>
+ * <p>
+ * A MacOS installation of OpenOffice.org will have some different paths, and of course the windows installation too.
+ * This class is used to abstract the platform OOo is installed on.
+ * </p>
  * 
  * @author cedricbosdo
- *
+ * 
  */
 public class OOo extends AbstractOOo {
-    
+
     /**
-     * private constant that holds the ooo name key in the bootstrap
-     * properties file.
+     * private constant that holds the ooo name key in the bootstrap properties file.
      */
-    private static final String  K_PRODUCTKEY = "ProductKey"; //$NON-NLS-1$
-    
+    private static final String K_PRODUCTKEY = "ProductKey"; //$NON-NLS-1$
+
     private boolean mDoRemovePackage = false;
-    
+
     private OOo3PathMapper mMapper;
-    
+
     /**
      * Creating a new OOo instance specifying its home directory.
      * 
-     * @param pOooHome the OpenOffice.org home directory
+     * @param pOooHome
+     *            the OpenOffice.org home directory
      * 
-     * @throws InvalidConfigException is thrown if the home directory doesn't
-     *         contains the required files and directories
+     * @throws InvalidConfigException
+     *             is thrown if the home directory doesn't contains the required files and directories
      */
     public OOo(String pOooHome) throws InvalidConfigException {
         super(pOooHome);
     }
-    
+
     /**
      * Creating a new OOo instance specifying its home directory and name.
      * 
-     * @param pOooHome the OpenOffice.org installation path
-     * @param pOooName the OpenOffice.org instance name
+     * @param pOooHome
+     *            the OpenOffice.org installation path
+     * @param pOooName
+     *            the OpenOffice.org instance name
      * 
-     * @throws InvalidConfigException is thrown if the home directory doesn't
-     *         contains the required files and directories
+     * @throws InvalidConfigException
+     *             is thrown if the home directory doesn't contains the required files and directories
      */
     public OOo(String pOooHome, String pOooName) throws InvalidConfigException {
         super(pOooHome, pOooName);
     }
-    
-    //----------------------------------------------------- IOOo Implementation
-    
+
+    // ----------------------------------------------------- IOOo Implementation
+
     /**
      * Overridden to initialize the path mapper for 00o3 installations.
      * 
-     * @param pHome the OOo installation path to set.
+     * @param pHome
+     *            the OOo installation path to set.
      * 
-     * @throws InvalidConfigException if the path doesn't point to a
-     *      valid OOo installation.
+     * @throws InvalidConfigException
+     *             if the path doesn't point to a valid OOo installation.
      */
     @Override
     public void setHome(String pHome) throws InvalidConfigException {
-        
+
         if (getPlatform().equals(Platform.OS_MACOSX)) {
             pHome = pHome + FILE_SEP + "Contents"; //$NON-NLS-1$
         }
-        
+
         mMapper = new OOo3PathMapper(pHome);
         super.setHome(pHome);
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String[] getClassesPath() {
-        
-        String[] paths = new String[] {
-            getLibsPath()[0] + FILE_SEP + "classes"  //$NON-NLS-1$
+
+        String[] paths = new String[] { getLibsPath()[0] + FILE_SEP + "classes" //$NON-NLS-1$
         };
-        
+
         if (mMapper.isVersion3()) {
             paths = mMapper.getClasses();
         }
-        
+
         return paths;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String[] getLibsPath() {
         // Nothing if not OOo3
         String[] otherPaths = mMapper.getAdditionnalLibs();
-        
+
         String libs = getHome() + FILE_SEP + "program"; //$NON-NLS-1$
         if (getPlatform().equals(Platform.OS_MACOSX)) {
             libs = getHome() + FILE_SEP + "MacOS"; //$NON-NLS-1$
         }
-        
-        return mMapper.mergeArrays(new String[]{ libs }, otherPaths);
+
+        return mMapper.mergeArrays(new String[] { libs }, otherPaths);
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String[] getBinPath() {
         // Nothing if not OOo3
         String[] otherPaths = mMapper.getAdditionnalBins();
-        
+
         String bins = getHome() + FILE_SEP + "program"; //$NON-NLS-1$
         if (Platform.getOS().equals(Platform.OS_MACOSX)) {
             bins = getHome() + FILE_SEP + "MacOS"; //$NON-NLS-1$
         }
-        
-        return mMapper.mergeArrays(new String[]{ bins }, otherPaths);
+
+        return mMapper.mergeArrays(new String[] { bins }, otherPaths);
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String[] getTypesPath() {
-        String[] paths = {
-            getLibsPath()[0] + FILE_SEP + "types.rdb" //$NON-NLS-1$ 
+        String[] paths = { getLibsPath()[0] + FILE_SEP + "types.rdb" //$NON-NLS-1$ 
         };
-        
+
         if (mMapper.isVersion3()) {
             paths = mMapper.getTypes();
         }
-        
-        return paths; 
+
+        return paths;
     }
 
     /**
      * {@inheritDoc}
      */
     public String[] getServicesPath() {
-        String[] paths = new String[] {
-            getLibsPath()[0] + FILE_SEP + "services.rdb" //$NON-NLS-1$
+        String[] paths = new String[] { getLibsPath()[0] + FILE_SEP + "services.rdb" //$NON-NLS-1$
         };
-        
+
         // Change the paths for OOo3 installs
         if (mMapper.isVersion3()) {
             paths = mMapper.getServices();
@@ -221,7 +224,7 @@ public class OOo extends AbstractOOo {
         }
         return path;
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -231,74 +234,73 @@ public class OOo extends AbstractOOo {
             uno = "uno.exe"; //$NON-NLS-1$
         }
         String unoPath = getLibsPath()[0] + FILE_SEP + uno;
-        
+
         if (mMapper.isVersion3()) {
             unoPath = mMapper.getUnoPath();
         }
-        
+
         return unoPath;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     protected void setName(String pName) {
-        
+
         String name = pName;
         if (name == null || name.equals("")) { //$NON-NLS-1$
             name = getOOoName();
         }
-        
+
         super.setName(name);
     }
-    
+
     /**
      * @return The OOo name as defined in Bootstraprc or <code>null</code>.
      */
     private String getOOoName() {
-        
+
         String oooname = null;
-        
+
         Path unorcPath = new Path(getUnorcPath());
         File unorcFile = unorcPath.toFile();
-        
+
         if (unorcFile.exists() && unorcFile.isFile()) {
-        
+
             Properties bootstraprcProperties = new Properties();
             try {
-                bootstraprcProperties.load(
-                        new FileInputStream(unorcFile));
-                
+                bootstraprcProperties.load(new FileInputStream(unorcFile));
+
                 // Checks if the name and buildid properties are set
                 if (bootstraprcProperties.containsKey(K_PRODUCTKEY)) {
-                    
+
                     // Sets the both value
                     oooname = bootstraprcProperties.getProperty(K_PRODUCTKEY);
                 }
-                
+
             } catch (Exception e) {
                 // Nothing to report
             }
         }
-        
+
         return oooname;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String toString() {
         return "OOo " + getName(); //$NON-NLS-1$
     }
-    
+
     /**
      * {@inheritDoc}
      */
-    public String createUnoCommand(String pImplementationName, String pLibLocation,
-            String[] pRegistriesPaths, String[] pArgs) {
-        
+    public String createUnoCommand(String pImplementationName, String pLibLocation, String[] pRegistriesPaths,
+                    String[] pArgs) {
+
         String command = ""; //$NON-NLS-1$
-        
+
         if (pLibLocation != null && !pLibLocation.equals("")) { //$NON-NLS-1$
             // Put the args into one string
             String sArgs = ""; //$NON-NLS-1$
@@ -328,8 +330,7 @@ public class OOo extends AbstractOOo {
                 for (int i = 0, length = content.length; i < length; i++) {
                     String contenti = content[i];
                     if (contenti.endsWith(".jar")) { //$NON-NLS-1$
-                        classpath += oooClassesPath + 
-                            fileSeparator + contenti + pathSeparator;
+                        classpath += oooClassesPath + fileSeparator + contenti + pathSeparator;
                     }
                 }
             }
@@ -340,86 +341,90 @@ public class OOo extends AbstractOOo {
             }
 
             command = "java " + classpath + " " + //$NON-NLS-1$ //$NON-NLS-2$
-                pImplementationName + " " + sArgs; //$NON-NLS-1$
+                            pImplementationName + " " + sArgs; //$NON-NLS-1$
         }
-            
+
         return command;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String getJavaldxPath() {
         String javaldx = getLibsPath() + FILE_SEP + "javaldx"; //$NON-NLS-1$
-        return  javaldx; 
+        return javaldx;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public boolean canManagePackages() {
         return true;
     }
-    
+
     /**
      * {@inheritDoc}
      */
-    public void updatePackage(File pPackageFile) {
-        
+    public void updatePackage(File pPackageFile, IPath pUserInstallation) {
+
         // Check if there is already a package with the same name
         try {
-            if (containsPackage(pPackageFile.getName())) {
+            if (containsPackage(pPackageFile.getName(), pUserInstallation)) {
                 mDoRemovePackage = false;
                 Display.getDefault().syncExec(new Runnable() {
                     public void run() {
-                        mDoRemovePackage = MessageDialog.openConfirm(Display.getDefault().getActiveShell(), 
-                                Messages.getString("OOo.PackageExportTitle"),  //$NON-NLS-1$
-                                Messages.getString("OOo.PackageAlreadyInstalled")); //$NON-NLS-1$
+                        mDoRemovePackage = MessageDialog.openConfirm(Display.getDefault().getActiveShell(), Messages
+                                        .getString("OOo.PackageExportTitle"), //$NON-NLS-1$
+                                        Messages.getString("OOo.PackageAlreadyInstalled")); //$NON-NLS-1$
                     }
                 });
                 if (mDoRemovePackage) {
                     // remove it
-                    removePackage(pPackageFile.getName());
+                    removePackage(pPackageFile.getName(), pUserInstallation);
                 }
             }
 
             // Add the package
-            addPackage(pPackageFile);
+            addPackage(pPackageFile, pUserInstallation);
 
         } catch (Exception e) {
             Display.getDefault().asyncExec(new Runnable() {
                 public void run() {
-                    MessageDialog.openError(Display.getDefault().getActiveShell(), 
-                            Messages.getString("OOo.PackageExportTitle"),  //$NON-NLS-1$
-                            Messages.getString("OOo.DeploymentError"));     //$NON-NLS-1$
+                    MessageDialog.openError(Display.getDefault().getActiveShell(), Messages
+                                    .getString("OOo.PackageExportTitle"), //$NON-NLS-1$
+                                    Messages.getString("OOo.DeploymentError")); //$NON-NLS-1$
                 }
             });
             PluginLogger.error(Messages.getString("OOo.DeploymentError"), e); //$NON-NLS-1$
         }
     }
-    
+
     /**
      * Add a Uno package to the OOo user packages.
      * 
-     * FIXME This method has to handle license ap
-     * proval
+     * FIXME This method has to handle license ap proval
      * 
-     * @param pPackageFile the package file to add
-     * @throws Exception if anything wrong happens
+     * @param pPackageFile
+     *            the package file to add
+     * @param pUserInstallation
+     *            path to the user profile folder.
+     * @throws Exception
+     *             if anything wrong happens
      */
-    private void addPackage(File pPackageFile) throws Exception {
+    private void addPackage(File pPackageFile, IPath pUserInstallation) throws Exception {
         String path = pPackageFile.getAbsolutePath();
         if (getPlatform().equals(Platform.OS_WIN32)) {
             path = "\"" + path + "\""; //$NON-NLS-1$ //$NON-NLS-2$
         }
         String shellCommand = "unopkg gui -f " + path; //$NON-NLS-1$
-        
+
         String[] env = SystemHelper.getSystemEnvironement();
         String pathsep = System.getProperty("path.separator"); //$NON-NLS-1$
         env = SystemHelper.addEnv(env, "PATH", getHome() + FILE_SEP + "program", pathsep); //$NON-NLS-1$ //$NON-NLS-2$
-        
+        env = addUserProfile(pUserInstallation, env);
+
         Process process = SystemHelper.runTool(shellCommand, env, null);
-        
+
         InputStreamReader in = new InputStreamReader(process.getInputStream());
         LineNumberReader reader = new LineNumberReader(in);
 
@@ -431,54 +436,63 @@ public class OOo extends AbstractOOo {
             }
             line = reader.readLine();
         }
-        
+
         try {
             reader.close();
             in.close();
         } catch (Exception e) {
         }
-        
+
         if (failed) {
-            throw new Exception(Messages.getString("OOo.PackageAddError") +  //$NON-NLS-1$
-                    pPackageFile.getAbsolutePath());
+            throw new Exception(Messages.getString("OOo.PackageAddError") + //$NON-NLS-1$
+                            pPackageFile.getAbsolutePath());
         }
     }
-    
+
     /**
      * Remove the named package from the OOo packages.
      * 
-     * @param pName the name of the package to remove
-     * @throws Exception if anything wrong happens
+     * @param pName
+     *            the name of the package to remove
+     * @param pUuserInstallation
+     *            TODO
+     * @throws Exception
+     *             if anything wrong happens
      */
-    private void removePackage(String pName) throws Exception {
+    private void removePackage(String pName, IPath pUuserInstallation) throws Exception {
         String shellCommand = "unopkg remove " + pName; //$NON-NLS-1$
-        
+
         String[] env = SystemHelper.getSystemEnvironement();
         String filesep = System.getProperty("file.separator"); //$NON-NLS-1$
         String pathsep = System.getProperty("path.separator"); //$NON-NLS-1$
         env = SystemHelper.addEnv(env, "PATH", getHome() + filesep + "program", pathsep); //$NON-NLS-1$ //$NON-NLS-2$
-        
+        env = addUserProfile(pUuserInstallation, env);
+
         SystemHelper.runTool(shellCommand, env, null);
     }
-    
+
     /**
      * Check if the named package is already installed on OOo.
      * 
-     * @param pName the package name to look for
-     * @return <code>true</code> if the package is installed, 
-     *             <code>false</code> otherwise
-     * @throws Exception if anything wrong happens
+     * @param pName
+     *            the package name to look for
+     * @param pUserInstallation
+     *            path to the user profile.
+     * @return <code>true</code> if the package is installed, <code>false</code> otherwise
+     * @throws Exception
+     *             if anything wrong happens
      */
-    private boolean containsPackage(String pName) throws Exception {
+    private boolean containsPackage(String pName, IPath pUserInstallation) throws Exception {
         boolean contained = false;
-        
+
         String shellCommand = "unopkg list"; //$NON-NLS-1$
-        
+
         String[] env = SystemHelper.getSystemEnvironement();
         String filesep = System.getProperty("file.separator"); //$NON-NLS-1$
         String pathsep = System.getProperty("path.separator"); //$NON-NLS-1$
         env = SystemHelper.addEnv(env, "PATH", getHome() + filesep + "program", pathsep); //$NON-NLS-1$ //$NON-NLS-2$
-        
+        env = addUserProfile(pUserInstallation, env);
+
         Process process = SystemHelper.runTool(shellCommand, env, null);
         InputStreamReader in = new InputStreamReader(process.getInputStream());
         LineNumberReader reader = new LineNumberReader(in);
@@ -490,56 +504,57 @@ public class OOo extends AbstractOOo {
             }
             line = reader.readLine();
         }
-        
+
         try {
             reader.close();
             in.close();
         } catch (Exception e) {
         }
-        
+
         return contained;
     }
-    
+
     /**
      * A class providing the paths for the OOo3 installation.
      * 
      * @author cbosdonnat
-     *
+     * 
      */
     private class OOo3PathMapper {
-        
+
         private String mHome;
         private String mBasis;
-        
+
         private boolean mVersionChecked = false;
-        
+
         /**
          * This field holds the URE instance to use for OOo3.
          */
         private URE mUre;
-        
+
         /**
          * Create a new mapper object to get the OOo3 layers paths.
          * 
-         * @param pHome the OOo install home
+         * @param pHome
+         *            the OOo install home
          */
         public OOo3PathMapper(String pHome) {
             mHome = pHome;
         }
 
         /**
-         * @return <code>true</code> if the openoffice install corresponds to a 3.0 
-         *      installation layout, <code>false</code> otherwise.
+         * @return <code>true</code> if the openoffice install corresponds to a 3.0 installation layout,
+         *         <code>false</code> otherwise.
          */
         public boolean isVersion3() {
             boolean version3 = false;
-            
-            if (!mVersionChecked ) {
+
+            if (!mVersionChecked) {
                 try {
                     Path homePath = new Path(mHome);
                     File homeFile = homePath.toFile();
 
-                    File basis = getPortableLink("basis-link",homeFile); //$NON-NLS-1$
+                    File basis = getPortableLink("basis-link", homeFile); //$NON-NLS-1$
                     File ure = getPortableLink("ure-link", basis); //$NON-NLS-1$
 
                     version3 = basis.isDirectory() && ure.isDirectory();
@@ -551,147 +566,147 @@ public class OOo extends AbstractOOo {
                 } catch (Exception e) {
                     version3 = false;
                 }
-                
+
                 mVersionChecked = true;
             } else {
                 version3 = mUre != null;
             }
-            
+
             return version3;
         }
-        
+
         /**
-         * @return the libraries path to add for OOo3 or an empty array if not an 
-         *      OOo3 install.
+         * @return the libraries path to add for OOo3 or an empty array if not an OOo3 install.
          */
         public String[] getAdditionnalLibs() {
             String[] additionnal = new String[0];
-            
+
             if (isVersion3()) {
                 String[] ureLibs = mUre.getLibsPath();
                 String basisLibs = mBasis + FILE_SEP + "program"; //$NON-NLS-1$
-                
-                additionnal = mergeArrays(ureLibs, new String[]{basisLibs});
+
+                additionnal = mergeArrays(ureLibs, new String[] { basisLibs });
             }
-            
+
             return additionnal;
         }
-        
+
         /**
-         * @return the binaries path to add for OOo3 or an empty array if not an
-         *      OOo3 install.   
+         * @return the binaries path to add for OOo3 or an empty array if not an OOo3 install.
          */
         public String[] getAdditionnalBins() {
             String[] additionnal = new String[0];
-            
+
             if (isVersion3()) {
                 String[] ureBins = mUre.getBinPath();
                 String basisBins = mBasis + FILE_SEP + "program"; //$NON-NLS-1$
-                
-                additionnal = mergeArrays(ureBins, new String[]{basisBins});
+
+                additionnal = mergeArrays(ureBins, new String[] { basisBins });
             }
-            
+
             return additionnal;
         }
-        
+
         /**
          * @return the OOo 3.0 classes path or an empty array if not an OOo3 install.
          */
         public String[] getClasses() {
             String[] classes = new String[0];
-            
+
             if (isVersion3()) {
                 String[] ureClasses = mUre.getClassesPath();
                 String basisClasses = mBasis + FILE_SEP + "program" + //$NON-NLS-1$ 
-                    FILE_SEP + "classes"; //$NON-NLS-1$
-                
-                classes = mergeArrays(ureClasses, new String[]{basisClasses});
+                                FILE_SEP + "classes"; //$NON-NLS-1$
+
+                classes = mergeArrays(ureClasses, new String[] { basisClasses });
             }
-            
+
             return classes;
         }
-        
+
         /**
          * @return the OOo3 types path or an empty array if not an OOo3 install.
          */
         public String[] getTypes() {
             String[] types = new String[0];
-            
+
             if (isVersion3()) {
                 String[] ureTypes = mUre.getTypesPath();
                 String basisTypes = mBasis + FILE_SEP + "program" + //$NON-NLS-1$ 
-                    FILE_SEP + "offapi.rdb"; //$NON-NLS-1$
-                
-                types = mergeArrays(ureTypes, new String[]{basisTypes});
+                                FILE_SEP + "offapi.rdb"; //$NON-NLS-1$
+
+                types = mergeArrays(ureTypes, new String[] { basisTypes });
             }
-            
+
             return types;
         }
-        
+
         /**
          * @return the OOo3 services.rdb files or <code>null</code> if not an OOo3 install.
          */
         public String[] getServices() {
             String[] types = new String[0];
-            
+
             if (isVersion3()) {
                 String[] ureTypes = mUre.getServicesPath();
                 String basisTypes = mBasis + FILE_SEP + "program" + //$NON-NLS-1$ 
-                    FILE_SEP + "services.rdb"; //$NON-NLS-1$
-                
-                types = mergeArrays(ureTypes, new String[]{basisTypes});
+                                FILE_SEP + "services.rdb"; //$NON-NLS-1$
+
+                types = mergeArrays(ureTypes, new String[] { basisTypes });
             }
-            
+
             return types;
         }
-        
+
         /**
-         * @return the path to the uno executable for OOo3 of <code>null</code> if 
-         *      not an OOo3 install.
+         * @return the path to the uno executable for OOo3 of <code>null</code> if not an OOo3 install.
          */
         public String getUnoPath() {
             String path = null;
             if (isVersion3()) {
                 path = mUre.getUnoPath();
             }
-            
-            return path; 
+
+            return path;
         }
-        
+
         /**
          * Merge two string arrays into one.
          * 
          * The duplicated elements are not removed.
          * 
-         * @param pArray1 the first array to merge
-         * @param pArray2 the second array to merge
+         * @param pArray1
+         *            the first array to merge
+         * @param pArray2
+         *            the second array to merge
          * 
          * @return the array with the elements of both arrays
          */
         public String[] mergeArrays(String[] pArray1, String[] pArray2) {
             String[] result = new String[pArray1.length + pArray2.length];
-            
+
             System.arraycopy(pArray1, 0, result, 0, pArray1.length);
             System.arraycopy(pArray2, 0, result, pArray1.length, pArray2.length);
-            
+
             return result;
         }
-        
+
         /**
          * Get the file object for the link defined as a child of a folder.
          * 
-         * On Windows platform, the link relative location is specified as the content of 
-         * a file named after the link name. On Unix-based systems symbolic links are
-         * supported.
+         * On Windows platform, the link relative location is specified as the content of a file named after the link
+         * name. On Unix-based systems symbolic links are supported.
          * 
-         * @param pName the name of the symbolic link
-         * @param pParent the parent directory file
+         * @param pName
+         *            the name of the symbolic link
+         * @param pParent
+         *            the parent directory file
          * 
          * @return the file representing the link target or <code>null</code>
          */
         private File getPortableLink(String pName, File pParent) {
             File link = null;
-            
+
             File linkFile = new File(pParent, pName);
             if (getPlatform().equals(Platform.OS_WIN32)) {
                 // Read the content of the file to get the true folder
@@ -699,7 +714,7 @@ public class OOo extends AbstractOOo {
                     FileInputStream is = new FileInputStream(linkFile);
                     byte[] buf = new byte[is.available()];
                     is.read(buf);
-                    
+
                     String relativePath = new String(buf);
                     linkFile = new File(pParent, relativePath);
                     link = linkFile;
@@ -709,7 +724,7 @@ public class OOo extends AbstractOOo {
             } else {
                 link = linkFile;
             }
-            
+
             return link;
         }
     }
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/SDK.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/SDK.java
old mode 100755
new mode 100644
index 46b79a3..a6b5cb8
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/SDK.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/SDK.java
@@ -62,7 +62,7 @@ import org.eclipse.swt.graphics.Image;
 import org.openoffice.ide.eclipse.core.OOEclipsePlugin;
 import org.openoffice.ide.eclipse.core.PluginLogger;
 import org.openoffice.ide.eclipse.core.gui.ITableElement;
-import org.openoffice.ide.eclipse.core.internal.helpers.SystemHelper;
+import org.openoffice.ide.eclipse.core.helpers.SystemHelper;
 import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
 import org.openoffice.ide.eclipse.core.model.config.IOOo;
 import org.openoffice.ide.eclipse.core.model.config.ISdk;
@@ -386,7 +386,7 @@ public class SDK implements ISdk, ITableElement {
      * @return the merged environment variables.
      */
     private String[] mergeVariables(String[] pBaseEnv, String[] pToMergeEnv) {
-
+        //TODO cdan should add a test for this method (all entries in pToMergeEnv should be found in the result) 
         // PATH merging
         String[] vars = pBaseEnv;
         for (int i = 0; i < pToMergeEnv.length; i++) {
@@ -395,7 +395,7 @@ public class SDK implements ISdk, ITableElement {
             if (m.matches()) {
                 String name = m.group(1);
                 String value = m.group(2);
-                vars = SystemHelper.addEnv(pBaseEnv, name, value, SystemHelper.PATH_SEPARATOR);
+                vars = SystemHelper.addEnv(vars, name, value, SystemHelper.PATH_SEPARATOR);
             }
         }
         return vars;
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/URE.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/URE.java
index fb8db68..db993b3 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/URE.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/URE.java
@@ -45,6 +45,7 @@ package org.openoffice.ide.eclipse.core.internal.model;
 
 import java.io.File;
 
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.openoffice.ide.eclipse.core.model.config.InvalidConfigException;
@@ -53,16 +54,17 @@ import org.openoffice.ide.eclipse.core.model.config.InvalidConfigException;
  * Class representing a URE installation.
  * 
  * @author cedricbosdo
- *
+ * 
  */
 public class URE extends AbstractOOo {
 
     /**
      * Creating a new URE instance specifying its home directory.
      * 
-     * @param pHome the URE home directory
-     * @throws InvalidConfigException is thrown if the home directory doesn't
-     *         contains the required files and directories
+     * @param pHome
+     *            the URE home directory
+     * @throws InvalidConfigException
+     *             is thrown if the home directory doesn't contains the required files and directories
      */
     public URE(String pHome) throws InvalidConfigException {
         super(pHome);
@@ -72,29 +74,31 @@ public class URE extends AbstractOOo {
     /**
      * Creating a new URE instance specifying its home directory and name.
      * 
-     * @param pHome the URE home directory
-     * @param pName the URE name
+     * @param pHome
+     *            the URE home directory
+     * @param pName
+     *            the URE name
      * 
-     * @throws InvalidConfigException is thrown if the home directory doesn't
-     *         contains the required files and directories
+     * @throws InvalidConfigException
+     *             is thrown if the home directory doesn't contains the required files and directories
      */
     public URE(String pHome, String pName) throws InvalidConfigException {
         super(pHome, pName);
     }
-    
+
     /**
      * {@inheritDoc}
      */
     protected void setName(String pName) {
-        
+
         String name = pName;
         if (name == null || name.equals("")) { //$NON-NLS-1$
             name = "URE"; //$NON-NLS-1$
         }
-        
+
         super.setName(name);
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -103,7 +107,7 @@ public class URE extends AbstractOOo {
         if (getPlatform().equals(Platform.OS_WIN32)) {
             jars = getHome() + FILE_SEP + "java"; //$NON-NLS-1$
         }
-        return new String[]{ jars };
+        return new String[] { jars };
     }
 
     /**
@@ -114,15 +118,15 @@ public class URE extends AbstractOOo {
         if (getPlatform().equals(Platform.OS_WIN32)) {
             libs = getHome() + FILE_SEP + "bin"; //$NON-NLS-1$
         }
-        return new String[]{ libs };
+        return new String[] { libs };
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String[] getBinPath() {
         String libs = getHome() + FILE_SEP + "bin"; //$NON-NLS-1$
-        return new String[]{ libs };
+        return new String[] { libs };
     }
 
     /**
@@ -130,11 +134,11 @@ public class URE extends AbstractOOo {
      */
     public String[] getTypesPath() {
         String types = getHome() + FILE_SEP + "share" + FILE_SEP + "misc" + //$NON-NLS-1$ //$NON-NLS-2$ 
-            FILE_SEP + "types.rdb"; //$NON-NLS-1$
+                        FILE_SEP + "types.rdb"; //$NON-NLS-1$
         if (getPlatform().equals(Platform.OS_WIN32)) {
             types = getHome() + FILE_SEP + "misc" + FILE_SEP + "types.rdb"; //$NON-NLS-1$ //$NON-NLS-2$
         }
-        return new String[]{ types };
+        return new String[] { types };
     }
 
     /**
@@ -142,11 +146,11 @@ public class URE extends AbstractOOo {
      */
     public String[] getServicesPath() {
         String services = getHome() + FILE_SEP + "share" + FILE_SEP + "misc" + //$NON-NLS-1$ //$NON-NLS-2$ 
-                FILE_SEP + "services.rdb"; //$NON-NLS-1$
+                        FILE_SEP + "services.rdb"; //$NON-NLS-1$
         if (getPlatform().equals(Platform.OS_WIN32)) {
             services = getHome() + FILE_SEP + "misc" + FILE_SEP + "services.rdb"; //$NON-NLS-1$ //$NON-NLS-2$
         }
-        return new String[]{ services };
+        return new String[] { services };
     }
 
     /**
@@ -159,60 +163,60 @@ public class URE extends AbstractOOo {
         }
         return path;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String getUnoPath() {
         String uno = "uno.bin"; //$NON-NLS-1$
         if (getPlatform().equals(Platform.OS_WIN32)) {
-            uno = "uno.exe";  //$NON-NLS-1$
+            uno = "uno.exe"; //$NON-NLS-1$
         }
-        
+
         return getHome() + FILE_SEP + "bin" + FILE_SEP + uno; //$NON-NLS-1$
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String toString() {
         return "URE " + getName(); //$NON-NLS-1$
     }
-    
+
     /**
      * {@inheritDoc}
      */
-    public String createUnoCommand(String pImplementationName, 
-            String pLibLocation, String[] pRegistriesPath, String[] pArgs) {
-        
+    public String createUnoCommand(String pImplementationName, String pLibLocation, String[] pRegistriesPath,
+                    String[] pArgs) {
+
         String command = ""; //$NON-NLS-1$
-        
+
         // Put the args into one string
         String sArgs = ""; //$NON-NLS-1$
         for (int i = 0; i < pArgs.length; i++) {
             sArgs += pArgs[i];
-            
+
             if (i < pArgs.length - 1) {
                 sArgs += " "; //$NON-NLS-1$
             }
         }
-        
+
         // Transform the registries into a string to give to UNO
         String additionnalRegistries = ""; //$NON-NLS-1$
         for (int i = 0; i < pRegistriesPath.length; i++) {
             additionnalRegistries += "-ro " + pRegistriesPath[i]; //$NON-NLS-1$
-            
+
             if (i < pRegistriesPath.length - 1) {
                 additionnalRegistries += " "; //$NON-NLS-1$
             }
         }
-        
+
         // Get the paths to OOo instance types and services registries
         String typesArg = ""; //$NON-NLS-1$
         String[] paths = getTypesPath();
         for (String path : paths) {
             Path typesPath = new Path(path);
-            String sTypesPath = typesPath.toString().replace(" ", "%20");  //$NON-NLS-1$ //$NON-NLS-2$
+            String sTypesPath = typesPath.toString().replace(" ", "%20"); //$NON-NLS-1$ //$NON-NLS-2$
             typesArg += " -ro file:///" + sTypesPath; //$NON-NLS-1$
         }
 
@@ -223,40 +227,38 @@ public class URE extends AbstractOOo {
             String sServicesPath = servicesPath.toString().replace(" ", "%20"); //$NON-NLS-1$ //$NON-NLS-2$
             serviceArgs += " -ro file:///" + sServicesPath; //$NON-NLS-1$
         }
-        
+
         String unoPath = getUnoPath();
         if (Platform.OS_WIN32.equals(getPlatform())) {
-            unoPath = "\"" + unoPath + "\"";  // escape spaces in windows names //$NON-NLS-1$ //$NON-NLS-2$
+            unoPath = "\"" + unoPath + "\""; // escape spaces in windows names //$NON-NLS-1$ //$NON-NLS-2$
         }
-        
-        command = unoPath +
-            " -c " + pImplementationName +  //$NON-NLS-1$
-            " -l " + pLibLocation +  //$NON-NLS-1$
-            typesArg +
-            " -ro file:///" + serviceArgs +  //$NON-NLS-1$
-            " " + additionnalRegistries +  //$NON-NLS-1$
-            " -- " + sArgs;  //$NON-NLS-1$
-        
+
+        command = unoPath + " -c " + pImplementationName + //$NON-NLS-1$
+                        " -l " + pLibLocation + //$NON-NLS-1$
+                        typesArg + " -ro file:///" + serviceArgs + //$NON-NLS-1$
+                        " " + additionnalRegistries + //$NON-NLS-1$
+                        " -- " + sArgs; //$NON-NLS-1$
+
         return command;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String getJavaldxPath() {
         return getHome() + FILE_SEP + "bin" + FILE_SEP + "javaldx"; //$NON-NLS-1$ //$NON-NLS-2$ 
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public boolean canManagePackages() {
         return false;
     }
-    
+
     /**
      * {@inheritDoc}
      */
-    public void updatePackage(File pPackageFile) {    
+    public void updatePackage(File pPackageFile, IPath userInstallation) {
     }
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
old mode 100755
new mode 100644
index eb1c39b..d968722
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
@@ -78,47 +78,45 @@ import org.openoffice.ide.eclipse.core.model.language.LanguagesHelper;
  * This class implements the UNO-IDL and project nature interface.
  * 
  * @author cedricbosdo
- *
+ * 
  */
 public class UnoidlProject implements IUnoidlProject, IProjectNature {
-    
+
     /**
      * Project property that stores the company prefix.
      */
     public static final String COMPANY_PREFIX = "project.prefix"; //$NON-NLS-1$
-    
+
     /**
      * Project property that stores the output path extension.
      * 
-     * <p>If the company prefix is <code>org.openoffice.sample</code> and this
-     * property value is <code>impl</code>, the root package of the 
-     * implementations classes is <code>org.openoffice.sample.impl</code>.</p>
+     * <p>
+     * If the company prefix is <code>org.openoffice.sample</code> and this property value is <code>impl</code>, the
+     * root package of the implementations classes is <code>org.openoffice.sample.impl</code>.
+     * </p>
      */
     public static final String OUTPUT_EXT = "project.implementation"; //$NON-NLS-1$
 
     /**
-     * Project property that stores the sdk name to use for  
-     * the project build.
+     * Project property that stores the sdk name to use for the project build.
      */
     public static final String SDK_NAME = "project.sdk"; //$NON-NLS-1$
-    
+
     /**
-     * Project property that stores the name of the OpenOffice.org instance
-     * used to run / deploy the project.
+     * Project property that stores the name of the OpenOffice.org instance used to run / deploy the project.
      */
     public static final String OOO_NAME = "project.ooo"; //$NON-NLS-1$
-    
+
     /**
-     * Project property that stores the language name. 
+     * Project property that stores the language name.
      */
     public static final String LANGUAGE = "project.language"; //$NON-NLS-1$
-    
+
     /**
-     * Project property that stores the path to the folder containing
-     * the sources. 
+     * Project property that stores the path to the folder containing the sources.
      */
     public static final String SRC_DIRECTORY = "project.srcdir"; //$NON-NLS-1$
-    
+
     /**
      * Property name for the idl folder.
      */
@@ -128,14 +126,14 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
      * Property name for the build directory.
      */
     public static final String BUILD_DIR = "project.build"; //$NON-NLS-1$
-    
+
     /**
      * The name of the file containing the UNO project configuration.
      */
     private static final String CONFIG_FILE = ".unoproject"; //$NON-NLS-1$
-    
+
     private IProject mProject;
-    
+
     private String mCompanyPrefix;
 
     private String mOutputExtension;
@@ -143,23 +141,22 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
     private ISdk mSdk;
 
     private IOOo mOOo;
-    
+
     private AbstractLanguage mLanguage;
-    
+
     private String mIdlDir;
-    
+
     private String mSourcesDir;
-    
+
     private IConfigListener mConfigListener;
-    
+
     /**
-     * Listener for the configuration to handle the changes on SDK and OOo
-     * instances.
+     * Listener for the configuration to handle the changes on SDK and OOo instances.
      * 
      * @author cedricbosdo
      */
     private class configListener implements IConfigListener {
-        
+
         /**
          * {@inheritDoc}
          */
@@ -179,10 +176,10 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
                 }
             } else if (pElement instanceof IOOo) {
                 if (pElement == getOOo()) {
-                    
+
                     // Removes OOo dependencies
                     getLanguage().getProjectHandler().removeOOoDependencies(getOOo(), getProject());
-                    
+
                     // Sets the selected OOo to null, it will tag the project as invalid
                     setOOo(null);
                 }
@@ -197,30 +194,28 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
                 if (pElement == getOOo()) {
                     // the ooo is updated thanks to it's reference. Remove the old jar files
                     // from the classpath and the new ones
-                    
+
                     // Removes OOo dependencies
-                    getLanguage().getProjectHandler().removeOOoDependencies(
-                            getOOo(), getProject());
-                    getLanguage().getProjectHandler().addOOoDependencies(
-                            getOOo(), getProject());
+                    getLanguage().getProjectHandler().removeOOoDependencies(getOOo(), getProject());
+                    getLanguage().getProjectHandler().addOOoDependencies(getOOo(), getProject());
                 }
             }
         }
     }
-    
-    //------------------------------------------------------------ Constructors
-    
+
+    // ------------------------------------------------------------ Constructors
+
     /**
      * Default constructor initializing the configuration listener.
      */
     public UnoidlProject() {
-        
+
         mConfigListener = new configListener();
-        
+
         SDKContainer.addListener(mConfigListener);
         OOoContainer.addListener(mConfigListener);
     }
-    
+
     /**
      * Removes the listeners needed by the UNO project.
      */
@@ -228,30 +223,29 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
         SDKContainer.removeListener(mConfigListener);
         OOoContainer.removeListener(mConfigListener);
     }
-    
+
     /**
-     * Return the path of the file in the idl folder. If the given file doesn't
-     * belong to the idl folder, <code>null</code> is returned.
+     * Return the path of the file in the idl folder. If the given file doesn't belong to the idl folder,
+     * <code>null</code> is returned.
      * 
-     * @param pResource resource of which the idl path is asked
+     * @param pResource
+     *            resource of which the idl path is asked
      * @return idl relative path or <code>null</code>
      */
     public IPath getIdlRelativePath(IResource pResource) {
         IPath result = null;
-        
+
         IPath projectRelative = pResource.getProjectRelativePath();
-        
+
         if (projectRelative.toString().startsWith(getIdlPath().toString())) {
-            result = projectRelative.removeFirstSegments(
-                    getIdlPath().segmentCount());
+            result = projectRelative.removeFirstSegments(getIdlPath().segmentCount());
         }
         return result;
     }
-    
-    
-    //*************************************************************************
+
+    // *************************************************************************
     // IUnoidlModel Implementation
-    //*************************************************************************
+    // *************************************************************************
 
     /**
      * {@inheritDoc}
@@ -259,50 +253,50 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
     public AbstractLanguage getLanguage() {
         return mLanguage;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String getName() {
         return getProject().getName();
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IOOo getOOo() {
         return mOOo;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public ISdk getSdk() {
         return mSdk;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public void setLanguage(AbstractLanguage pNewLanguage) {
-        
+
         if (mLanguage == null && pNewLanguage != null) {
-            mLanguage = pNewLanguage; 
+            mLanguage = pNewLanguage;
             mLanguage.getProjectHandler().addProjectNature(getProject());
             PluginLogger.debug("Language specific nature added"); //$NON-NLS-1$
         }
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public void setOOo(IOOo pOoo) {
-        
+
         setErrorMarker(null == pOoo || null == getSdk());
-        
+
         try {
             IProjectHandler langHandler = getLanguage().getProjectHandler();
-            
+
             // Remove the old OOo libraries
             langHandler.removeOOoDependencies(mOOo, getProject());
 
@@ -311,27 +305,27 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
         } catch (Exception e) {
             // This might happen at some stage of the project creation
         }
-        
+
         this.mOOo = pOoo;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public void setSdk(ISdk pSdk) {
-        
+
         setErrorMarker(pSdk == null || null == getOOo());
-            
+
         this.mSdk = pSdk;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public void setIdlDir(String pIdlDir) {
         mIdlDir = pIdlDir;
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -339,68 +333,67 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
         if (pSourcesDir == null || pSourcesDir.equals("")) { //$NON-NLS-1$
             pSourcesDir = UnoidlProjectHelper.SOURCE_BASIS;
         }
-        
+
         // Add a / at the beginning of the path
         if (!pSourcesDir.startsWith("/")) { //$NON-NLS-1$
             pSourcesDir = "/" + pSourcesDir; //$NON-NLS-1$
         }
-        
+
         mSourcesDir = pSourcesDir;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String getRootModule() {
         String result = ""; //$NON-NLS-1$
-        
+
         if (null != mCompanyPrefix) {
             result = mCompanyPrefix.replaceAll("\\.", "::"); //$NON-NLS-1$ //$NON-NLS-2$
         }
         return result;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IPath getRootModulePath() {
         IPath result = null;
-        
+
         if (null != mCompanyPrefix) {
-            result = getIdlPath().append(
-                    mCompanyPrefix.replaceAll("\\.", "/")); //$NON-NLS-1$ //$NON-NLS-2$
+            result = getIdlPath().append(mCompanyPrefix.replaceAll("\\.", "/")); //$NON-NLS-1$ //$NON-NLS-2$
         }
         return result;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public void setCompanyPrefix(String pPrefix) {
         mCompanyPrefix = pPrefix;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String getCompanyPrefix() {
         return mCompanyPrefix;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public void setOutputExtension(String pOutputExt) {
         mOutputExtension = pOutputExt;
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String getOutputExtension() {
         return mOutputExtension;
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -409,10 +402,10 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
         if (!buildDir.startsWith("/")) { //$NON-NLS-1$
             buildDir = "/" + buildDir; //$NON-NLS-1$
         }
-        
+
         return getFolder(buildDir).getProjectRelativePath();
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -421,10 +414,10 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
         if (!idlDir.startsWith("/")) { //$NON-NLS-1$
             idlDir = "/" + idlDir; //$NON-NLS-1$
         }
-        
+
         return getFolder(idlDir).getProjectRelativePath();
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -432,54 +425,69 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
         String path = new String(mCompanyPrefix + "." + mOutputExtension).replace('.', '/'); //$NON-NLS-1$
         return getSourcePath().append(path);
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IPath getProjectPath() {
         return getProject().getLocation();
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IPath getTypesPath() {
         return new Path("types.rdb"); //$NON-NLS-1$
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IPath getServicesPath() {
         return new Path("services.rdb"); //$NON-NLS-1$
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IPath getSourcePath() {
-        if ( mSourcesDir == null ) {
+        if (mSourcesDir == null) {
             mSourcesDir = getProperty(SRC_DIRECTORY);
         }
         return getFolder(mSourcesDir).getProjectRelativePath();
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IPath getUrdPath() {
         return getFolder(getBuildPath().append(UnoidlProjectHelper.URD_BASIS)).getProjectRelativePath();
     }
-    
+
     public IPath getDistPath() {
-        return getFolder(getBuildPath().append(UnoidlProjectHelper.DIST_BASIS))
-                .getProjectRelativePath();
+        return getFolder(UnoidlProjectHelper.DIST_BASIS).getProjectRelativePath();
+    }
+
+    public IFolder getDistFolder() throws CoreException {
+        IFolder folder = getFolder(getDistPath());
+        // TODO find better way to make sure the folder exists.
+        if (!folder.exists()) {
+            folder.getLocation().toFile().mkdirs();
+        }
+        return folder;
     }
-    
+
     public IPath getOpenOfficeUserProfilePath() {
-        return getFolder(
-                getDistPath().append(UnoidlProjectHelper.OO_PROFILE_BASIS))
-                .getProjectRelativePath();
+        return getFolder(getDistPath().append(UnoidlProjectHelper.OO_PROFILE_BASIS)).getProjectRelativePath();
+    }
+
+    public IFolder getOpenOfficeUserProfileFolder() throws CoreException {
+        IFolder folder = getFolder(getOpenOfficeUserProfilePath());
+        // TODO find better way to make sure the folder exists.
+        if (!folder.exists()) {
+            folder.getLocation().toFile().mkdirs();
+        }
+        return folder;
     }
 
     /**
@@ -488,21 +496,21 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
     public IFile getFile(IPath pPath) {
         return getProject().getFile(pPath);
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IFile getFile(String pPath) {
         return getProject().getFile(pPath);
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IFolder getFolder(IPath pPath) {
         return getProject().getFolder(pPath);
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -518,31 +526,34 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
     public File getConfigFile() {
         return new File(getProjectPath().append(CONFIG_FILE).toOSString());
     }
-    
+
     /**
      * Reads a property from the UNO project configuration file.
      * 
-     * <p>Returns the property corresponding to the given name. If the
-     * configuration file doesn't exists, a default one will be created.</p>
+     * <p>
+     * Returns the property corresponding to the given name. If the configuration file doesn't exists, a default one
+     * will be created.
+     * </p>
      * 
-     * @param pPropertyName the name of the property to get
+     * @param pPropertyName
+     *            the name of the property to get
      * @return the property value or <code>null</code> if not found.
      * 
      * @see #CONFIG_FILE for the configuration file name
      */
     public String getProperty(String pPropertyName) {
-        
+
         Properties properties = new Properties();
         File configFile = getConfigFile();
         String property = null;
-        
+
         FileInputStream in = null;
-        try  {
+        try {
             // Create a default configuration file if needed
             if (!configFile.exists()) {
                 UnoidlProjectHelper.createDefaultConfig(configFile);
             }
-        
+
             in = new FileInputStream(configFile);
             properties.load(in);
             property = properties.getProperty(pPropertyName);
@@ -551,70 +562,81 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
             String msg = MessageFormat.format(pattern, CONFIG_FILE);
             PluginLogger.warning(msg, e);
         } finally {
-            try { in.close(); } catch (IOException e) { }
+            try {
+                in.close();
+            } catch (IOException e) {
+            }
         }
-        
+
         return property;
     }
-    
+
     /**
      * Define a property in the UNO project configuration file.
      * 
-     * @param pName the property name
-     * @param pValue the property value
+     * @param pName
+     *            the property name
+     * @param pValue
+     *            the property value
      */
     public void setProperty(String pName, String pValue) {
         Properties properties = new Properties();
         File configFile = getConfigFile();
-        
+
         FileInputStream in = null;
         FileOutputStream out = null;
-        try  {
+        try {
             // Create a default configuration file if needed
             if (!configFile.exists()) {
                 UnoidlProjectHelper.createDefaultConfig(configFile);
             }
-        
+
             in = new FileInputStream(configFile);
             properties.load(in);
-        
+
             properties.setProperty(pName, pValue);
-        
+
             out = new FileOutputStream(configFile);
             properties.store(out, Messages.getString("UnoidlProject.ConfigFileComment")); //$NON-NLS-1$
-            
+
             // Refresh the configuration file
             getFile(CONFIG_FILE).refreshLocal(IResource.DEPTH_ZERO, null);
-            
+
         } catch (Exception e) {
             String pattern = Messages.getString("UnoidlProject.PropertyChangeError"); //$NON-NLS-1$
             String message = MessageFormat.format(pattern, pName, pValue);
             PluginLogger.warning(message, e);
         } finally {
-            try { in.close(); } catch (IOException e) { }
-            try { out.close(); } catch (IOException e) { }
+            try {
+                in.close();
+            } catch (IOException e) {
+            }
+            try {
+                out.close();
+            } catch (IOException e) {
+            }
         }
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public void saveAllProperties() {
-        
+
         Properties properties = new Properties();
         File configFile = getConfigFile();
-        
+
         // Create a default configuration file if needed
         if (!configFile.exists()) {
             UnoidlProjectHelper.createDefaultConfig(configFile);
         }
-        
+
         FileInputStream in = null;
         FileOutputStream out = null;
-        try  {
+        try {
             in = new FileInputStream(configFile);
             properties.load(in);
-        
+
             properties.setProperty(LANGUAGE, mLanguage.getName());
             properties.setProperty(OOO_NAME, mOOo.getName());
             properties.setProperty(SDK_NAME, mSdk.getId());
@@ -622,59 +644,65 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
             properties.setProperty(SRC_DIRECTORY, mSourcesDir);
             properties.setProperty(COMPANY_PREFIX, mCompanyPrefix);
             properties.setProperty(OUTPUT_EXT, mOutputExtension);
-        
+
             out = new FileOutputStream(configFile);
             properties.store(out, Messages.getString("UnoidlProject.ConfigFileComment")); //$NON-NLS-1$
-            
+
             // Refresh the configuration file
             getFile(CONFIG_FILE).refreshLocal(IResource.DEPTH_ZERO, null);
-            
+
         } catch (Exception e) {
             PluginLogger.warning(Messages.getString("UnoidlProject.ConfigFileSaveError"), e); //$NON-NLS-1$
         } finally {
-            try { in.close(); } catch (Exception e) { }
-            try { out.close(); } catch (Exception e) { }
+            try {
+                in.close();
+            } catch (Exception e) {
+            }
+            try {
+                out.close();
+            } catch (Exception e) {
+            }
         }
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public IFolder[] getBinFolders() {
-        return getLanguage().getProjectHandler().getBinFolders( this );
+        return getLanguage().getProjectHandler().getBinFolders(this);
     }
-    
-    //*************************************************************************
+
+    // *************************************************************************
     // IProjectNature Implementation
-    //*************************************************************************
-    
+    // *************************************************************************
+
     /**
      * {@inheritDoc}
      */
     public void configure() throws CoreException {
-        
+
         // Load all the persistent properties into the members
-        
+
         String sdkKey = getProperty(SDK_NAME);
         if (sdkKey != null) {
             setSdk(SDKContainer.getSDK(sdkKey));
         }
-        
+
         String prefix = getProperty(COMPANY_PREFIX);
         if (prefix != null) {
             mCompanyPrefix = prefix;
         }
-        
+
         String outputExt = getProperty(OUTPUT_EXT);
         if (outputExt != null) {
             mOutputExtension = outputExt;
         }
-        
+
         String languageName = getProperty(LANGUAGE);
         if (languageName != null) {
             setLanguage(LanguagesHelper.getLanguageFromName(languageName));
         }
-        
+
         String idlDir = getProperty(IDL_DIR);
         if (idlDir != null) {
             setIdlDir(idlDir);
@@ -684,17 +712,17 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
         if (srcDir != null) {
             setSourcesDir(srcDir);
         }
-        
+
         String oooKey = getProperty(OOO_NAME);
         if (oooKey != null) {
             IOOo someOOo = OOoContainer.getSomeOOo(oooKey);
             setOOo(someOOo);
         }
-        
+
         // Save any change from the read project file
         saveAllProperties();
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -715,78 +743,73 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
     public void setProject(IProject pProject) {
         mProject = pProject;
     }
-    
-    
-    //*************************************************************************
+
+    // *************************************************************************
     // Useful methods for the nature implementation
-    //*************************************************************************
-    
+    // *************************************************************************
 
     /**
-     * Set the builders for the project. 
+     * Set the builders for the project.
      * 
-     * <p>This method configures the builders using the implementation 
-     * language informations</p> 
+     * <p>
+     * This method configures the builders using the implementation language informations
+     * </p>
      * 
-     * @throws CoreException if the builders can't be set.
+     * @throws CoreException
+     *             if the builders can't be set.
      */
     public void setBuilders() throws CoreException {
-        if (!(null == mSdk || null == mOOo || 
-                null == mCompanyPrefix || null == mOutputExtension)) {
-        
+        if (!(null == mSdk || null == mOOo || null == mCompanyPrefix || null == mOutputExtension)) {
+
             // Set the types builder
             IProjectDescription descr = getProject().getDescription();
             ICommand[] builders = descr.getBuildSpec();
             ICommand[] newCommands = new ICommand[builders.length + 1];
-        
+
             ICommand typesbuilderCommand = descr.newCommand();
             typesbuilderCommand.setBuilderName(TypesBuilder.BUILDER_ID);
             newCommands[0] = typesbuilderCommand;
-            
+
             System.arraycopy(builders, 0, newCommands, 1, builders.length);
-            
+
             descr.setBuildSpec(newCommands);
             getProject().setDescription(descr, null);
         }
     }
-    
+
     /**
      * {@inheritDoc}
      */
     public String toString() {
         return "UNO Project " + getName(); //$NON-NLS-1$
     }
-    
+
     /**
-     * Toggle an error marker on the project indicating that the there is either
-     * no OpenOffice.org nor SDK set.
+     * Toggle an error marker on the project indicating that the there is either no OpenOffice.org nor SDK set.
      * 
-     * @param pSet <code>true</code> if the error marker should be set, <code>false</code>
-     *      otherwise.
+     * @param pSet
+     *            <code>true</code> if the error marker should be set, <code>false</code> otherwise.
      */
     private void setErrorMarker(boolean pSet) {
-        
+
         IProject prjRes = getProject();
-        
+
         try {
             if (pSet) {
                 IMarker marker = prjRes.createMarker(IMarker.PROBLEM);
                 marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
-                marker.setAttribute(IMarker.MESSAGE, 
-                    Messages.getString("UnoidlProject.NoOOoSdkError")); //$NON-NLS-1$
+                marker.setAttribute(IMarker.MESSAGE, Messages.getString("UnoidlProject.NoOOoSdkError")); //$NON-NLS-1$
             } else {
                 prjRes.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
             }
         } catch (CoreException e) {
             if (pSet) {
-                PluginLogger.error(
-                        Messages.getString("UnoidlProject.CreateMarkerError") +  //$NON-NLS-1$
-                                    getProjectPath().toString(), e);
+                PluginLogger.error(Messages.getString("UnoidlProject.CreateMarkerError") + //$NON-NLS-1$
+                                getProjectPath().toString(), e);
             } else {
-                PluginLogger.error(
-                        Messages.getString("UnoidlProject.RemoveMarkerError"), e); //$NON-NLS-1$
+                PluginLogger.error(Messages.getString("UnoidlProject.RemoveMarkerError"), e); //$NON-NLS-1$
             }
         }
-        
+
     }
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java
index 05aa460..5605121 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java
@@ -1,8 +1,59 @@
-package org.openoffice.ide.eclipse.core.launch.office;
-
-public interface IOfficeLaunchConstants {
-
-    String PROJECT_NAME = "project_name"; //$NON-NLS-1$
-    String CLEAN_USER_INSTALLATION = "useCleanUserInstallation"; //$NON-NLS-1$
-
-}
+/*************************************************************************
+ *
+ * $RCSfile:  $
+ *
+ * $Revision:  $
+ *
+ * last change: $Author:  $ $Date:  $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * the GNU Lesser General Public License Version 2.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ * 
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
+ *
+ * Copyright: 2002 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): Cedric Bosdonnat, Dan Corneanu
+ *
+ *
+ ************************************************************************/
+package org.openoffice.ide.eclipse.core.launch.office;
+
+import org.openoffice.ide.eclipse.core.OOEclipsePlugin;
+
+/**
+ * Just a bunch of constants.
+ * 
+ * @author cdan
+ * 
+ */
+public interface IOfficeLaunchConstants {
+
+    String PROJECT_NAME = OOEclipsePlugin.OOECLIPSE_PLUGIN_ID + ".PROJECT_ATTR";
+    String CLEAN_USER_INSTALLATION = OOEclipsePlugin.OOECLIPSE_PLUGIN_ID + ".USE_CLEAN_USER_INSTALLATION_ATTR";
+
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java
index 6921e21..93fb7a1 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java
@@ -1,21 +1,80 @@
-package org.openoffice.ide.eclipse.core.launch.office;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-
-public class LaunchConfigurationTabs extends
-        AbstractLaunchConfigurationTabGroup {
-
-    /**
-     * {@inheritDoc}
-     */
-    public void createTabs(ILaunchConfigurationDialog pDialog, String pMode) {
-        ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
-            new OfficeTab(), new CommonTab() };
-
-        setTabs(tabs);
-
-    }
-}
+/*************************************************************************
+ *
+ * $RCSfile:  $
+ *
+ * $Revision:  $
+ *
+ * last change: $Author:  $ $Date:  $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * the GNU Lesser General Public License Version 2.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ * 
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
+ *
+ * Copyright: 2002 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): Cedric Bosdonnat, Dan Corneanu
+ *
+ *
+ ************************************************************************/
+package org.openoffice.ide.eclipse.core.launch.office;
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+
+/**
+ * Creates tabs in the OpenOffice launcher.
+ * 
+ * @author cdan
+ * 
+ */
+public class LaunchConfigurationTabs extends AbstractLaunchConfigurationTabGroup {
+
+    /**
+     * {@inheritDoc}
+     */
+    public void createTabs(ILaunchConfigurationDialog pDialog, String pMode) {
+        ILaunchConfigurationTab[] tabs =  null;
+        if (ILaunchManager.DEBUG_MODE.equals(pMode)) {
+            tabs = new ILaunchConfigurationTab[] { 
+                new OfficeTab(), 
+                new SourceLookupTab(),
+                new CommonTab() };
+        } else {
+            tabs = new ILaunchConfigurationTab[] { 
+                new OfficeTab(), 
+                new CommonTab() };
+        }
+
+        setTabs(tabs);
+    }
+
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
index b653dde..5f362ec 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
@@ -1,29 +1,23 @@
-package org.openoffice.ide.eclipse.core.launch.office;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-    
-    public static String OfficeLaunchDelegate_LaunchError;
-    public static String OfficeLaunchDelegate_LaunchErrorTitle;
-    public static String OfficeTab_Options;
-    public static String OfficeTab_Configurationerror;
-    public static String OfficeTab_ProjectNameLabel;
-    public static String OfficeTab_Title;
-    public static String OfficeTab_UnoProject;
-    public static String OfficeTab_ChkUseCleanUserInstallation;
-    public static String OfficeTab_ChkUseCleanUserInstallation_ToolTip;
-    
-    private static final String BUNDLE_NAME = "org.openoffice.ide.eclipse.core.launch.office.messages"; //$NON-NLS-1$
-    
-    static {
-        // initialize resource bundle
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    /**
-     * Private constructor.
-     */
-    private Messages() {
-    }
-}
+package org.openoffice.ide.eclipse.core.launch.office;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.openoffice.ide.eclipse.core.launch.office.messages"; //$NON-NLS-1$
+    public static String OfficeLaunchDelegate_LaunchError;
+    public static String OfficeLaunchDelegate_LaunchErrorTitle;
+    public static String OfficeTab_Options;
+    public static String OfficeTab_Configurationerror;
+    public static String OfficeTab_ProjectNameLabel;
+    public static String OfficeTab_Title;
+    public static String OfficeTab_UnoProject;
+    public static String OfficeTab_ChkUseCleanUserInstallation;
+    public static String OfficeTab_ChkUseCleanUserInstallation_ToolTip;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
index 5bddc5c..16d83b1 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
@@ -1,87 +1,252 @@
-package org.openoffice.ide.eclipse.core.launch.office;
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
-import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
-import org.openoffice.ide.eclipse.core.model.ProjectsManager;
-import org.openoffice.ide.eclipse.core.model.language.ILanguageBuilder;
-
-public class OfficeLaunchDelegate extends LaunchConfigurationDelegate {
-
-    /**
-     * Export the .oxt file, deploy it in openoffice, run openoffice.
-     */
-    private static final int TASK_UNITS = 3;
-
-    /**
-     * {@inheritDoc}
-     */
-    public void launch(ILaunchConfiguration pConfiguration, String pMode,
-            ILaunch pLaunch, IProgressMonitor pMonitor) throws CoreException {
-        if (pMonitor == null) {
-            pMonitor = new NullProgressMonitor();
-        }
-
-        try {
-            pMonitor.beginTask(MessageFormat.format("{0}...", //$NON-NLS-1$
-                    new Object[] { pConfiguration.getName() }), TASK_UNITS);
-            // check for cancellation
-            if (pMonitor.isCanceled()) {
-                return;
-            }
-
-            String prjName = pConfiguration.getAttribute(
-                    IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
-            boolean useCleanUserInstalation = pConfiguration.getAttribute(
-                    IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false);
-            
-            IUnoidlProject prj = ProjectsManager.getProject(prjName);
-
-            if (null != prj) {
-                try {
-                    ILanguageBuilder langBuilder = prj.getLanguage()
-                            .getLanguageBuidler();
-                    langBuilder.createLibrary(prj);
-
-                    // Run an OpenOffice instance
-                    IPath userInstallation = null;
-                    if (useCleanUserInstalation) {
-                        IFolder userInstallationFolder = prj.getFolder(prj
-                                .getOpenOfficeUserProfilePath());
-                        //TODO find  better way to make sure the folder exists.
-                        if (!userInstallationFolder.exists()) {
-                            ((IFolder)userInstallationFolder.getParent()).create(true, true, null);
-                            userInstallationFolder.create(true, true, null);
-                        }
-                        userInstallation = userInstallationFolder.getLocation();
-                    }
-                            
-                    prj.getOOo().runOpenOffice(prj, pLaunch, userInstallation,
-                            pMonitor);
-                } catch (Exception e) {
-                    Display.getDefault().asyncExec(new Runnable() {
-
-                        public void run() {
-                            MessageDialog.openError(Display.getDefault()
-                                    .getActiveShell(), Messages.OfficeLaunchDelegate_LaunchErrorTitle, 
-                                    Messages.OfficeLaunchDelegate_LaunchError);     
-                        }
-                    });
-                }
-            }
-        } finally {
-            pMonitor.done();
-        }
-    }
-
-}
+/*************************************************************************
+ *
+ * $RCSfile:  $
+ *
+ * $Revision:  $
+ *
+ * last change: $Author:  $ $Date:  $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * the GNU Lesser General Public License Version 2.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ * 
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
+ *
+ * Copyright: 2002 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): Cedric Bosdonnat, Dan Corneanu
+ *
+ *
+ ************************************************************************/
+package org.openoffice.ide.eclipse.core.launch.office;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.openoffice.ide.eclipse.core.PluginLogger;
+import org.openoffice.ide.eclipse.core.helpers.SystemHelper;
+import org.openoffice.ide.eclipse.core.internal.helpers.UnoidlProjectHelper;
+import org.openoffice.ide.eclipse.core.internal.model.UnoidlProject;
+import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
+import org.openoffice.ide.eclipse.core.model.ProjectsManager;
+import org.openoffice.ide.eclipse.core.model.config.IOOo;
+import org.openoffice.ide.eclipse.core.model.config.NullExtraOptionsProvider;
+import org.openoffice.ide.eclipse.core.model.language.ILanguageBuilder;
+import org.openoffice.ide.eclipse.core.model.pack.UnoPackage;
+import org.openoffice.ide.eclipse.core.utils.FilesFinder;
+
+/**
+ * OpenOffice launcher implementation.
+ * 
+ * @author cdan
+ * 
+ */
+public class OfficeLaunchDelegate extends LaunchConfigurationDelegate {
+
+    /**
+     * Export the .oxt file, deploy it in openoffice, run openoffice.
+     */
+    private static final int TASK_UNITS = 3;
+
+    /**
+     * {@inheritDoc}
+     */
+    public void launch(ILaunchConfiguration pConfiguration, String pMode, ILaunch pLaunch, IProgressMonitor pMonitor)
+        throws CoreException {
+        if (pMonitor == null) {
+            pMonitor = new NullProgressMonitor();
+        }
+
+        try {
+            pMonitor.beginTask(MessageFormat.format("{0}...", //$NON-NLS-1$
+                            new Object[] { pConfiguration.getName() }), TASK_UNITS);
+            // check for cancellation
+            if (pMonitor.isCanceled()) {
+                return;
+            }
+
+            String prjName = pConfiguration.getAttribute(IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
+            boolean useCleanUserInstalation = pConfiguration.getAttribute(
+                            IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false);
+
+            IUnoidlProject prj = ProjectsManager.getProject(prjName);
+
+            if (null != prj) {
+                try {
+                    IPath userInstallation = null;
+                    if (useCleanUserInstalation) {
+                        IFolder userInstallationFolder = prj.getOpenOfficeUserProfileFolder();
+                        userInstallation = userInstallationFolder.getLocation();
+                    }
+
+                    File destFile = exportComponent(pMonitor, prj);
+                    pMonitor.worked(1);
+
+                    // Try to source ooenv if it exists
+                    sourceOOEnv(prj);
+                    
+                    // Deploy the component
+                    deployComponent(prj, userInstallation, destFile);
+                    pMonitor.worked(1);
+
+                    // Run an OpenOffice instance
+                    if (ILaunchManager.DEBUG_MODE.equals(pMode)) {
+                        prj.getLanguage().connectDebuggerToOpenOffice(prj, pLaunch, userInstallation, pMonitor);
+                    } else {
+                        prj.getOOo().runOpenOffice(prj, pLaunch, userInstallation, new NullExtraOptionsProvider(),
+                                        pMonitor);
+                    }
+                    pMonitor.worked(1);
+                } catch (Exception e) {
+                    Display.getDefault().asyncExec(new Runnable() {
+
+                        public void run() {
+                            MessageDialog.openError(Display.getDefault().getActiveShell(),
+                                            Messages.OfficeLaunchDelegate_LaunchErrorTitle,
+                                            Messages.OfficeLaunchDelegate_LaunchError);
+                        }
+                    });
+                }
+            }
+        } finally {
+            pMonitor.done();
+        }
+    }
+
+    /**
+     * Tries to source ooenv if it exists and if we are on alinux OS.
+     * 
+     * @param pPrj the target project.
+     * @throws IOException if we were unable to start the command
+     */
+    private void sourceOOEnv(IUnoidlProject pPrj) throws IOException {
+        if (Platform.getOS().equals(Platform.OS_LINUX)) {
+            IOOo oo = pPrj.getOOo();
+            String home = oo.getHome();
+            File homeFolder = new File(home);
+            File programFolder = new File(homeFolder, "program");
+            File oooenvFile = new File(programFolder, "ooenv");
+            
+            if (oooenvFile.isFile()) {
+                String pathsep = System.getProperty("path.separator"); //$NON-NLS-1$
+                String shellCommand = "source ooenv"; //$NON-NLS-1$
+                String[] env = SystemHelper.getSystemEnvironement();
+                env = SystemHelper.addEnv(env, "PATH", 
+                                programFolder.getAbsolutePath(), pathsep); //$NON-NLS-1$
+                
+                System.err.println("Sourcing: " + shellCommand);
+                System.err.println("Sourcing.env: " + Arrays.toString(env));
+                
+                Process process = SystemHelper.runTool(shellCommand, env, null);
+                try {
+                    process.waitFor();
+                } catch (InterruptedException e) {
+                    PluginLogger.error("Interrupted while waiting for the source command to complete.", e);
+                }
+            }
+        }
+    }
+
+    /**
+     * Deploys the .oxt component in an OpenOffice installation.
+     * 
+     * @param pPrj
+     *            target project
+     * @param pUserInstallation
+     *            user profile to use
+     * @param pOxtFile
+     *            the .oxt file
+     */
+    private void deployComponent(IUnoidlProject pPrj, IPath pUserInstallation, File pOxtFile) {
+        IOOo mOOo = pPrj.getOOo();
+        if (mOOo.canManagePackages()) {
+            mOOo.updatePackage(pOxtFile, pUserInstallation);
+        }
+    }
+
+    /**
+     * Will bild and export the .oxt file.
+     * 
+     * @param pMonitor
+     *            a monitor to report progress to.
+     * @param pPrj
+     *            te target project.
+     * @return the file containing the .oxt file.
+     * @throws Exception
+     *             if something goes wrong.
+     */
+    private File exportComponent(IProgressMonitor pMonitor, IUnoidlProject pPrj) throws Exception {
+
+        ILanguageBuilder langBuilder = pPrj.getLanguage().getLanguageBuidler();
+        IPath libraryPath = langBuilder.createLibrary(pPrj);
+
+        IFolder distFolder = pPrj.getFolder(pPrj.getDistPath());
+
+        File destFile = distFolder.getFile(pPrj.getName() + ".oxt").getLocation().toFile();
+        UnoPackage pack = UnoidlProjectHelper.createMinimalUnoPackage(pPrj, destFile);
+        pack.addToClean(libraryPath);
+
+        // FIXME this code is duplicated.
+        IFile descrFile = pPrj.getFile(IUnoidlProject.DESCRIPTION_FILENAME);
+        if (descrFile.exists()) {
+            pack.addContent(descrFile);
+        }
+
+        // Select the XCU / XCS files by default
+        FilesFinder finder = new FilesFinder(
+                        new String[] { IUnoidlProject.XCU_EXTENSION, IUnoidlProject.XCS_EXTENSION });
+        finder.addExclude(pPrj.getDistFolder().getFullPath());
+        try {
+            ((UnoidlProject) pPrj).getProject().accept(finder);
+        } catch (CoreException e) {
+            // Nothing to log here
+        }
+        ArrayList<IFile> files = finder.getResults();
+        for (IFile aFile : files) {
+            pack.addContent(aFile);
+        }
+
+        pack.close(pMonitor);
+        return destFile;
+    }
+
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
index 1b0b5b9..432dd08 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
@@ -1,157 +1,237 @@
-package org.openoffice.ide.eclipse.core.launch.office;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.openoffice.ide.eclipse.core.PluginLogger;
-import org.openoffice.ide.eclipse.core.gui.UnoProjectLabelProvider;
-import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
-import org.openoffice.ide.eclipse.core.model.ProjectsManager;
-
-public class OfficeTab extends AbstractLaunchConfigurationTab {
-
-    private static final int LAYOUT_COLUMNS = 3;
-    private Text mProjectTxt;
-    private Button mProjectBtn;
-    private Button mUseCleanUserInstallation;
-    private SelectionListener mListener = new ChangeListener();
-
-    public void createControl(Composite pParent) {
-        Composite comp = new Composite(pParent, SWT.NONE);
-        comp.setLayoutData(new GridData(GridData.FILL_BOTH));
-        comp.setLayout(new GridLayout());
-
-        createProjectGroup(comp);
-
-        createOptionsGroup(comp);
-
-        setControl(comp);
-    }
-
-    private void createOptionsGroup(Composite pParent) {
-        Group group = new Group(pParent, SWT.NONE);
-        group.setText(Messages.OfficeTab_Options);
-        group.setLayout(new GridLayout());
-        group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-        mUseCleanUserInstallation = new Button(group, SWT.CHECK);
-        mUseCleanUserInstallation
-                .setText(Messages.OfficeTab_ChkUseCleanUserInstallation);
-        mUseCleanUserInstallation.addSelectionListener(mListener);
-        mUseCleanUserInstallation.setToolTipText(Messages.OfficeTab_ChkUseCleanUserInstallation_ToolTip);
-    }
-
-    private void createProjectGroup(Composite pParent) {
-        Group group = new Group(pParent, SWT.NONE);
-        group.setText(Messages.OfficeTab_UnoProject);
-        group.setLayout(new GridLayout());
-        group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-        Composite field = new Composite(group, SWT.NONE);
-        field.setLayout(new GridLayout(LAYOUT_COLUMNS, false));
-        field.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-        Label lbl = new Label(field, SWT.NONE);
-        lbl.setText(Messages.OfficeTab_ProjectNameLabel);
-        lbl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
-        mProjectTxt = new Text(field, SWT.SINGLE | SWT.BORDER);
-        mProjectTxt.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
-                | GridData.GRAB_HORIZONTAL));
-        // mProjectTxt.addModifyListener(mListener);
-
-        mProjectBtn = new Button(field, SWT.PUSH);
-        mProjectBtn.setText("..."); //$NON-NLS-1$
-        mProjectBtn.addSelectionListener(mListener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getName() {
-        return Messages.OfficeTab_Title;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void initializeFrom(ILaunchConfiguration pConfiguration) {
-        try {
-            mProjectTxt.setText(pConfiguration.getAttribute(
-                    IOfficeLaunchConstants.PROJECT_NAME, new String()));
-            mUseCleanUserInstallation.setSelection(pConfiguration.getAttribute(
-                    IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false));
-        } catch (CoreException e) {
-            PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
-        }
-    }
-
-    public void performApply(ILaunchConfigurationWorkingCopy pConfiguration) {
-        pConfiguration.setAttribute(IOfficeLaunchConstants.PROJECT_NAME,
-                mProjectTxt.getText().trim());
-        pConfiguration.setAttribute(
-                IOfficeLaunchConstants.CLEAN_USER_INSTALLATION,
-                mUseCleanUserInstallation.getSelection());
-    }
-
-    public void setDefaults(ILaunchConfigurationWorkingCopy pConfiguration) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public boolean isValid(ILaunchConfiguration pLaunchConfig) {
-        boolean valid = false;
-
-        try {
-
-            boolean projectSet = !pLaunchConfig.getAttribute(
-                    IOfficeLaunchConstants.PROJECT_NAME, "").equals("");//$NON-NLS-1$ //$NON-NLS-2$
-            if (projectSet) {
-                String name = pLaunchConfig.getAttribute(
-                        IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
-                valid = ProjectsManager.getProject(name) != null;
-            }
-        } catch (CoreException e) {
-            PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
-        }
-
-        return valid;
-    }
-
-    private class ChangeListener extends SelectionAdapter {
-        public void widgetSelected(SelectionEvent pEvent) {
-            if (pEvent.getSource().equals(mProjectBtn)) {
-                ILabelProvider labelProvider = new UnoProjectLabelProvider();
-                ElementListSelectionDialog dialog = new ElementListSelectionDialog(
-                        getShell(), labelProvider);
-                dialog.setTitle("ProjectChooserTitle"); //$NON-NLS-1$
-                dialog.setMessage("ProjectChooserMessage"); //$NON-NLS-1$
-                dialog.setElements(ProjectsManager.getProjects());
-
-                if (dialog.open() == Window.OK) {
-                    IUnoidlProject mProject = (IUnoidlProject) dialog
-                            .getFirstResult();
-                    mProjectTxt.setText(mProject.getName());
-                }
-            }
-            setDirty(true);
-            getLaunchConfigurationDialog().updateButtons();
-        }
-    }
-}
+/*************************************************************************
+ *
+ * $RCSfile:  $
+ *
+ * $Revision:  $
+ *
+ * last change: $Author:  $ $Date:  $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * the GNU Lesser General Public License Version 2.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ * 
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
+ *
+ * Copyright: 2002 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): Cedric Bosdonnat, Dan Corneanu
+ *
+ *
+ ************************************************************************/
+package org.openoffice.ide.eclipse.core.launch.office;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.sourcelookup.ISourcePathComputer;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.openoffice.ide.eclipse.core.PluginLogger;
+import org.openoffice.ide.eclipse.core.gui.UnoProjectLabelProvider;
+import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
+import org.openoffice.ide.eclipse.core.model.ProjectsManager;
+
+/**
+ * Tab for configuring the OpenOffice launch properties.
+ * 
+ * @author cdan
+ * 
+ */
+public class OfficeTab extends AbstractLaunchConfigurationTab {
+
+    private static final int LAYOUT_COLUMNS = 3;
+    private Text mProjectTxt;
+    private Button mProjectBtn;
+    private Button mUseCleanUserInstallation;
+    private SelectionListener mListener = new ChangeListener();
+
+    /**
+     * {@inheritDoc}
+     */
+    public void createControl(Composite pParent) {
+        Composite comp = new Composite(pParent, SWT.NONE);
+        comp.setLayoutData(new GridData(GridData.FILL_BOTH));
+        comp.setLayout(new GridLayout());
+
+        createProjectGroup(comp);
+
+        createOptionsGroup(comp);
+
+        setControl(comp);
+    }
+
+    /**
+     * Creates a group with UI controls for changing the launcher's options.
+     * 
+     * @param pParent
+     *            the parent composite to add our self to.
+     */
+    private void createOptionsGroup(Composite pParent) {
+        Group group = new Group(pParent, SWT.NONE);
+        group.setText(Messages.OfficeTab_Options);
+        group.setLayout(new GridLayout());
+        group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        mUseCleanUserInstallation = createCheckButton(group, Messages.OfficeTab_ChkUseCleanUserInstallation);
+        mUseCleanUserInstallation.addSelectionListener(mListener);
+        mUseCleanUserInstallation.setToolTipText(Messages.OfficeTab_ChkUseCleanUserInstallation_ToolTip);
+    }
+
+    /**
+     * Creates a group with UI controls for selecting the target project.
+     * 
+     * @param pParent
+     *            the parent composite to add our self to.
+     */
+    private void createProjectGroup(Composite pParent) {
+        Group group = new Group(pParent, SWT.NONE);
+        group.setText(Messages.OfficeTab_UnoProject);
+        group.setLayout(new GridLayout());
+        group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        Composite field = new Composite(group, SWT.NONE);
+        field.setLayout(new GridLayout(LAYOUT_COLUMNS, false));
+        field.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        Label lbl = new Label(field, SWT.NONE);
+        lbl.setText(Messages.OfficeTab_ProjectNameLabel);
+        lbl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
+
+        mProjectTxt = new Text(field, SWT.SINGLE | SWT.BORDER);
+        mProjectTxt.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
+        // mProjectTxt.addModifyListener(mListener);
+
+        mProjectBtn = new Button(field, SWT.PUSH);
+        mProjectBtn.setText("...");
+        mProjectBtn.addSelectionListener(mListener);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName() {
+        return Messages.OfficeTab_Title;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void initializeFrom(ILaunchConfiguration pConfiguration) {
+        try {
+            mProjectTxt.setText(pConfiguration.getAttribute(IOfficeLaunchConstants.PROJECT_NAME, ""));
+            mUseCleanUserInstallation.setSelection(pConfiguration.getAttribute(
+                            IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false));
+        } catch (CoreException e) {
+            PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void performApply(ILaunchConfigurationWorkingCopy pConfiguration) {
+        pConfiguration.setAttribute(IOfficeLaunchConstants.PROJECT_NAME, mProjectTxt.getText().trim());
+        pConfiguration.setAttribute(IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, mUseCleanUserInstallation
+                        .getSelection());
+
+        try {
+            String projectName = pConfiguration.getAttribute(
+                            IOfficeLaunchConstants.PROJECT_NAME, "");
+            IUnoidlProject project = ProjectsManager.getProject(projectName);
+            if (null != project) {
+                project.getLanguage().configureSourceLocator(pConfiguration);
+            }
+        } catch (CoreException e) {
+            PluginLogger.error("Could not set language specific source locator attributes.", e);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setDefaults(ILaunchConfigurationWorkingCopy pConfiguration) {
+        pConfiguration.setAttribute(IOfficeLaunchConstants.PROJECT_NAME, "");
+        pConfiguration.setAttribute(IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, true);
+    }
+
+    @Override
+    public boolean isValid(ILaunchConfiguration pLaunchConfig) {
+        boolean valid = false;
+
+        try {
+
+            boolean projectSet = !pLaunchConfig.getAttribute(IOfficeLaunchConstants.PROJECT_NAME, "")
+                .equals("");//$NON-NLS-1$ //$NON-NLS-2$
+            if (projectSet) {
+                String name = pLaunchConfig.getAttribute(IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
+                valid = ProjectsManager.getProject(name) != null;
+            }
+        } catch (CoreException e) {
+            PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
+        }
+
+        return valid;
+    }
+
+    /**
+     * Change listener to be notified when the user touches the UI controls :).
+     * 
+     * @author cdan
+     * 
+     */
+    private class ChangeListener extends SelectionAdapter {
+        @Override
+        public void widgetSelected(SelectionEvent pEvent) {
+            if (pEvent.getSource().equals(mProjectBtn)) {
+                ILabelProvider labelProvider = new UnoProjectLabelProvider();
+                ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
+                dialog.setTitle("ProjectChooserTitle"); //$NON-NLS-1$
+                dialog.setMessage("ProjectChooserMessage"); //$NON-NLS-1$
+                dialog.setElements(ProjectsManager.getProjects());
+
+                if (dialog.open() == Window.OK) {
+                    IUnoidlProject mProject = (IUnoidlProject) dialog.getFirstResult();
+                    mProjectTxt.setText(mProject.getName());
+                }
+            }
+            setDirty(true);
+            getLaunchConfigurationDialog().updateButtons();
+        }
+    }
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties b/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties
index 72e525b..7d54f12 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
 OfficeLaunchDelegate_LaunchError=Error Message
 OfficeLaunchDelegate_LaunchErrorTitle=Error Title
 OfficeTab_Configurationerror=Configuration Error
@@ -8,4 +9,16 @@ OfficeTab_Options=Options
 OfficeTab_ChkUseCleanUserInstallation=Use Clean User Installation
 OfficeTab_ChkUseCleanUserInstallation_ToolTip=Start OpenOffice with a temporary user profile so that we do not pollute the system installed user profile.
 OfficeLaunchDelegate_LaunchErrorTitle=Error Launching OpenOffice
+=======
+OfficeLaunchDelegate_LaunchError=Error Message
+OfficeLaunchDelegate_LaunchErrorTitle=Error Title
+OfficeTab_Configurationerror=Configuration Error
+OfficeTab_ProjectNameLabel=Project
+OfficeTab_Title=OpenOffice
+OfficeTab_UnoProject=UNO Project
+OfficeTab_Options=Options
+OfficeTab_ChkUseCleanUserInstallation=Use Clean User Installation
+OfficeTab_ChkUseCleanUserInstallation_ToolTip=Start OpenOffice with a temporary user profile so that we do not pollute the system installed user profile.
+OfficeLaunchDelegate_LaunchErrorTitle=Error Launching OpenOffice
+>>>>>>> 2a46b52041f0f23b595e1cd433aaffec8fba6b2f
 OfficeLaunchDelegate_LaunchError=There was an exception launching OpenOffice.Please see the Error Log.
\ No newline at end of file
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java b/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java
index 93e760f..67fd77c 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java
@@ -45,6 +45,7 @@ package org.openoffice.ide.eclipse.core.model;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.openoffice.ide.eclipse.core.model.config.IOOo;
 import org.openoffice.ide.eclipse.core.model.config.ISdk;
@@ -67,6 +68,10 @@ public interface IUnoidlProject {
      */
     public static final String IDL_FOLDER = "idlfolder"; //$NON-NLS-1$
     
+    public static final String XCS_EXTENSION = "xcs"; //$NON-NLS-1$
+    
+    public static final String XCU_EXTENSION = "xcu"; //$NON-NLS-1$
+    
     /**
      * Cleans up the project before destroying it.
      */
@@ -244,19 +249,35 @@ public interface IUnoidlProject {
      */
     public IPath getUrdPath();
     
+	/**
+	 * @return the path to the project's folder containing the distribution .oxf
+	 *         file.
+	 */
+	public IPath getDistPath();
+
     /**
-     * @return the path to the project's folder containing the distribution .oxf
-     *         file.
-     */
-    public IPath getDistPath();
-    
-    /**
-     * @return the path to the project's folder used to store the user profile
-     *         when running/debugging OpenOffice in a clean environment. This
-     *         way we do not mangle with the system wide installed, OpenOffice
-     *         settings.
-     */
-    public IPath getOpenOfficeUserProfilePath();
+     * @return the folder folder containing the distribution .oxf file. If the folder does not exist then it is created.
+     * @throws CoreException
+     *             if we were unable to create the folder.
+     */
+	public IFolder getDistFolder() throws CoreException;
+	
+	/**
+	 * @return the path to the project's folder used to store the user profile
+	 *         when running/debugging OpenOffice in a clean environment. This
+	 *         way we do not mangle with the system wide installed, OpenOffice
+	 *         settings. 
+	 */
+	public IPath getOpenOfficeUserProfilePath();
+	
+	/**
+	 * @return the folder used to store the user profile
+	 *         when running/debugging OpenOffice in a clean environment. This
+	 *         way we do not mangle with the system wide installed, OpenOffice
+	 *         settings. If the folder does not exist then it is created. 
+	 * @throws CoreException if we were unable to create the folder. 
+	 */
+	public IFolder getOpenOfficeUserProfileFolder() throws CoreException;
     
     //----------------------------------------------- Project resources getters
     
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/config/IExtraOptionsProvider.java b/core/source/org/openoffice/ide/eclipse/core/model/config/IExtraOptionsProvider.java
new file mode 100644
index 0000000..6126069
--- /dev/null
+++ b/core/source/org/openoffice/ide/eclipse/core/model/config/IExtraOptionsProvider.java
@@ -0,0 +1,20 @@
+package org.openoffice.ide.eclipse.core.model.config;
+
+/**
+ * Gets a chance to add some more env variables just before starting an OpenOffice process.
+ * 
+ * @author cdan
+ * 
+ */
+public interface IExtraOptionsProvider {
+
+    /**
+     * Add your own env entries.
+     * 
+     * @param pEnv
+     *            the original env variables.
+     * @return 
+     *          the new env variables.
+     */
+    String[] addEnv(String[] pEnv);
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java b/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
index 2d1c055..96c307c 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
@@ -51,8 +51,7 @@ import org.eclipse.debug.core.ILaunch;
 import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
 
 /**
- * Interface for an OpenOffice.org configuration instance. This can even
- * be implemented as an URE instance.
+ * Interface for an OpenOffice.org configuration instance. This can even be implemented as an URE instance.
  * 
  * @author cedricbosdo
  */
@@ -61,128 +60,150 @@ public interface IOOo {
     /**
      * Set the home directory.
      * 
-     * @param pHome the absolute path to the home directory
-     * @throws InvalidConfigException is thrown if the path doesn't match the 
-     *         implementation requirement for an OOo instance. The error code will
-     *         be {@link InvalidConfigException#INVALID_OOO_HOME}
+     * @param pHome
+     *            the absolute path to the home directory
+     * @throws InvalidConfigException
+     *             is thrown if the path doesn't match the implementation requirement for an OOo instance. The error
+     *             code will be {@link InvalidConfigException#INVALID_OOO_HOME}
      */
     public void setHome(String pHome) throws InvalidConfigException;
-    
+
     /**
-     * Returns the path to the OpenOffice.org home directory. This string could 
-     * be passed to the Path constructor to get the folder object. 
+     * Returns the path to the OpenOffice.org home directory. This string could be passed to the Path constructor to get
+     * the folder object.
      * 
      * @return path to the OpenOffice.org home directory.
      */
     public String getHome();
-    
+
     /**
      * Returns the OOo name. It should be a unique identifier
      * 
      * @return ooo name
      */
     public String getName();
-    
+
     /**
-     * <p>Returns the path to the OpenOffice.org classes directory. 
-     * These strings could be passed to the Path constructor to get the 
-     * folder object.</p> 
+     * <p>
+     * Returns the path to the OpenOffice.org classes directory. These strings could be passed to the Path constructor
+     * to get the folder object.
+     * </p>
      * 
-     * <p><em>This method should be used for future compatibility with 
-     * URE applications</em></p>
+     * <p>
+     * <em>This method should be used for future compatibility with 
+     * URE applications</em>
+     * </p>
      * 
      * @return path to the OpenOffice.org classes directory
      */
     public String[] getClassesPath();
-    
+
     /**
-     * <p>Returns the path to the OpenOffice.org shared libraries. This string
-     * could be passed to the Path constructor to get the folder object.</p>
+     * <p>
+     * Returns the path to the OpenOffice.org shared libraries. This string could be passed to the Path constructor to
+     * get the folder object.
+     * </p>
      * 
      * @return path to the OpenOffice.org libraries directory
      */
     public String[] getLibsPath();
-    
+
     /**
-     * <p>Returns the path to any folder containing binaries in the OOo installation. 
-     * This string could be passed to the Path constructor to get the folder object.</p>
+     * <p>
+     * Returns the path to any folder containing binaries in the OOo installation. This string could be passed to the
+     * Path constructor to get the folder object.
+     * </p>
      * 
      * @return paths to the OpenOffice.org binary directories
      */
     public String[] getBinPath();
-    
+
     /**
-     * @return the path to the <code>types.rdb</code> file of the OOo or URE
-     * instance.
+     * @return the path to the <code>types.rdb</code> file of the OOo or URE instance.
      */
     public String[] getTypesPath();
-    
+
     /**
-     * @return the path to the <code>services.rdb</code> file of the OOo or URE
-     * instance.
+     * @return the path to the <code>services.rdb</code> file of the OOo or URE instance.
      */
     public String[] getServicesPath();
-    
+
     /**
      * @return the path to the UNO bootstrap properties file.
      */
     public String getUnorcPath();
-    
+
     /**
      * @return the path to the UNO executable file
      */
     public String getUnoPath();
-    
+
     /**
-     * @return the path to the <code>javaldx</code> executable 
+     * @return the path to the <code>javaldx</code> executable
      */
     public String getJavaldxPath();
-    
+
     /**
      * Returns a command to execute a <code>uno</code> component.
      * 
-     * @param pImplementationName the name of the component implementation to run
-     * @param pLibLocation the name of the library containing the implementation
-     * @param pRegistriesPaths the path to the additional registries
-     * @param pArgs the argument for the component launch
+     * @param pImplementationName
+     *            the name of the component implementation to run
+     * @param pLibLocation
+     *            the name of the library containing the implementation
+     * @param pRegistriesPaths
+     *            the path to the additional registries
+     * @param pArgs
+     *            the argument for the component launch
      * 
      * @return the command to execute the <code>uno</code> binary
      */
-    public String createUnoCommand(String pImplementationName, 
-            String pLibLocation, String[] pRegistriesPaths, String[] pArgs);
-    
+    public String createUnoCommand(String pImplementationName, String pLibLocation, String[] pRegistriesPaths,
+                    String[] pArgs);
+
     /**
-     * Run the <code>uno</code> executable with the given Main implementation, 
-     * the arguments and the launcher.
+     * Run the <code>uno</code> executable with the given Main implementation, the arguments and the launcher.
      * 
-     * @param pPrj the project to run
-     * @param pMain the main implementation
-     * @param pArgs the argument to pass to the main implementation
-     * @param pLaunch the launcher
-     * @param pMonitor a monitor to follow the progress
-     */
-    public void runUno(IUnoidlProject pPrj, String pMain, String pArgs, 
-            ILaunch pLaunch, IProgressMonitor pMonitor);
-    
+     * @param pPrj
+     *            the project to run
+     * @param pMain
+     *            the main implementation
+     * @param pArgs
+     *            the argument to pass to the main implementation
+     * @param pLaunch
+     *            the launcher
+     * @param pMonitor
+     *            a monitor to follow the progress
+     */
+    public void runUno(IUnoidlProject pPrj, String pMain, String pArgs, ILaunch pLaunch, IProgressMonitor pMonitor);
+
     /**
      * 
-     * @param pPrj the project to run
-     * @param pLaunch the launcher to which we'll add our processes
-     * @param pUserInstallation the userInstallation folder to use. If null we'll go with the default system one.
-     * @param pMonitor a monitor to follow the progress
-     */
-    public void runOpenOffice(IUnoidlProject pPrj,  
-            ILaunch pLaunch, IPath pUserInstallation, IProgressMonitor pMonitor);
-    
+     * @param pPrj
+     *            the project to run
+     * @param pLaunch
+     *            the launcher to which we'll add our processes
+     * @param pUserInstallation
+     *            the userInstallation folder to use. If null we'll go with the default system one.
+     * @param pExtraOptionsProvider
+     *            provider for extra env variables to be set before launching.
+     * @param pMonitor
+     *            a monitor to follow the progress
+     */
+    public void runOpenOffice(IUnoidlProject pPrj, ILaunch pLaunch, IPath pUserInstallation,
+                    IExtraOptionsProvider pExtraOptionsProvider, IProgressMonitor pMonitor);
+
     /**
      * @return <code>true</code> if the OOo instance has a package manager.
      */
     public boolean canManagePackages();
-    
+
     /**
      * Update a package in the OOo instance if it can manages packages.
      * 
-     * @param pPackageFile the package to add or update
+     * @param pPackageFile
+     *            the package to add or update
+     * @param pUserInstallation
+     *            path to the user profile folder.
      */
-    public void updatePackage(File pPackageFile);
+    public void updatePackage(File pPackageFile, IPath pUserInstallation);
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/config/NullExtraOptionsProvider.java b/core/source/org/openoffice/ide/eclipse/core/model/config/NullExtraOptionsProvider.java
new file mode 100644
index 0000000..f88aa1d
--- /dev/null
+++ b/core/source/org/openoffice/ide/eclipse/core/model/config/NullExtraOptionsProvider.java
@@ -0,0 +1,18 @@
+package org.openoffice.ide.eclipse.core.model.config;
+
+/**
+ * Does nothing.
+ * 
+ * @author cdan
+ * 
+ */
+public class NullExtraOptionsProvider implements IExtraOptionsProvider {
+
+    /**
+     * {@inheritDoc}
+     */
+    public String[] addEnv(String[] pEnv) {
+        return pEnv;
+    }
+
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/language/AbstractLanguage.java b/core/source/org/openoffice/ide/eclipse/core/model/language/AbstractLanguage.java
index a6cc345..1cbc5fd 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/language/AbstractLanguage.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/language/AbstractLanguage.java
@@ -30,79 +30,108 @@
  ************************************************************************/
 package org.openoffice.ide.eclipse.core.model.language;
 
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
 
 /**
  * Base class for the language extensions.
  * 
  * @author cbosdo
- *
+ * 
  */
 public abstract class AbstractLanguage {
 
     private IConfigurationElement mConfig;
-    
+
     /**
-     * @param pConfig the configuration element for the language
+     * @param pConfig
+     *            the configuration element for the language
      */
-    protected void setConfigurationElement(  IConfigurationElement pConfig ) {
+    protected void setConfigurationElement(IConfigurationElement pConfig) {
         mConfig = pConfig;
     }
-    
+
     /**
      * @return the language display name
      */
-    public String getName( ) {
-        return mConfig.getAttribute( "name" ); //$NON-NLS-1$
+    public String getName() {
+        return mConfig.getAttribute("name"); //$NON-NLS-1$
     }
-    
+
     /**
-     * @return the wizard page for the New UNO project wizard or <code>null</code> if none
-     *         has been defined.
+     * @return the wizard page for the New UNO project wizard or <code>null</code> if none has been defined.
      */
-    public LanguageWizardPage getNewWizardPage( ) {
+    public LanguageWizardPage getNewWizardPage() {
         LanguageWizardPage result = null;
-        IConfigurationElement[] children = mConfig.getChildren( "newWizardPage" ); //$NON-NLS-1$
-        if ( children.length > 0 ) {
+        IConfigurationElement[] children = mConfig.getChildren("newWizardPage"); //$NON-NLS-1$
+        if (children.length > 0) {
             // There can't be more than one
             try {
-                Object o = children[0].createExecutableExtension( "class" ); //$NON-NLS-1$
-                if ( o instanceof LanguageWizardPage ) {
-                    result = ( LanguageWizardPage )o;
+                Object o = children[0].createExecutableExtension("class"); //$NON-NLS-1$
+                if (o instanceof LanguageWizardPage) {
+                    result = (LanguageWizardPage) o;
                 }
-            } catch ( Exception e ) {
+            } catch (Exception e) {
             }
         }
         return result;
     }
-    
+
     /**
-     * @return the export build part for the UNO export wizard or <code>null</code> if none
-     *         has been defined.
+     * @return the export build part for the UNO export wizard or <code>null</code> if none has been defined.
      */
-    public LanguageExportPart getExportBuildPart( ) {
+    public LanguageExportPart getExportBuildPart() {
         LanguageExportPart result = null;
-        IConfigurationElement[] children = mConfig.getChildren( "exportBuildPart" ); //$NON-NLS-1$
-        if ( children.length > 0 ) {
+        IConfigurationElement[] children = mConfig.getChildren("exportBuildPart"); //$NON-NLS-1$
+        if (children.length > 0) {
             // There can't be more than one
             try {
-                Object o = children[0].createExecutableExtension( "class" ); //$NON-NLS-1$
-                if ( o instanceof LanguageExportPart ) {
-                    result = ( LanguageExportPart )o;
+                Object o = children[0].createExecutableExtension("class"); //$NON-NLS-1$
+                if (o instanceof LanguageExportPart) {
+                    result = (LanguageExportPart) o;
                 }
-            } catch ( Exception e ) {
+            } catch (Exception e) {
             }
         }
         return result;
     }
-    
+
     /**
      * @return the utility class for projects handling.
      */
     public abstract IProjectHandler getProjectHandler();
-    
+
     /**
      * @return the utility class for building.
      */
     public abstract ILanguageBuilder getLanguageBuidler();
+
+    /**
+     * Launch OpenOffice for debugging and connect the eclipse debugger to it. 
+     * Currently only Java debugging is supported.
+     * 
+     * @param pPrj the target project.
+     * @param pLaunch the launch configuration to add our debug target to.
+     * @param pUserInstallation user profile.
+     * @param pMonitor monitor to report progress to.
+     */
+    public abstract void connectDebuggerToOpenOffice(IUnoidlProject pPrj, ILaunch pLaunch, IPath pUserInstallation,
+                    IProgressMonitor pMonitor);
+
+    /**
+     * When in debug mode, we have to configure the 
+     * appropriate source locator for the respective language.
+     * 
+     * The rest will be taken care by the {@link SourceLookupTab}.
+     * 
+     * @param pConfiguration the configuration to add extra attributes to.
+     * @throws CoreException if something went wrong.
+     */
+    public abstract void configureSourceLocator(ILaunchConfigurationWorkingCopy pConfiguration) throws CoreException;
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/utils/FilesFinder.java b/core/source/org/openoffice/ide/eclipse/core/utils/FilesFinder.java
index 36edeb1..e543478 100644
--- a/core/source/org/openoffice/ide/eclipse/core/utils/FilesFinder.java
+++ b/core/source/org/openoffice/ide/eclipse/core/utils/FilesFinder.java
@@ -1,11 +1,14 @@
 package org.openoffice.ide.eclipse.core.utils;
 
 import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IResourceVisitor;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
 
 /**
  * Visitor looking for all the files with given extensions.
@@ -17,6 +20,7 @@ public class FilesFinder implements IResourceVisitor {
 
     private String[] mExtensions;
     private ArrayList<IFile> mFiles;
+    private Set<IPath> excludedPaths = new HashSet<IPath>();
     
     /**
      * Constructor.
@@ -39,7 +43,12 @@ public class FilesFinder implements IResourceVisitor {
      * {@inheritDoc}
      */
     public boolean visit(IResource pResource) throws CoreException {
-        
+
+    	IPath resourcePath = pResource.getFullPath();
+		if(this.excludedPaths.contains(resourcePath)) {
+    		return false;
+    	}
+		
         if ( pResource.getType() == IResource.FILE ) {
             boolean matches = false;
             String name = pResource.getName();
@@ -57,4 +66,8 @@ public class FilesFinder implements IResourceVisitor {
         
         return true;
     }
+
+	public void addExclude(IPath pDistPath) {
+		this.excludedPaths.add(pDistPath);		
+	}
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java b/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java
index 11734e0..2bac771 100644
--- a/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java
+++ b/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java
@@ -92,9 +92,6 @@ public class UnoPackageExportPage extends WizardPage {
     
     private static final int MAX_DESTINATION_STORED = 5;
 
-    private static final String XCS_EXTENSION = "xcs"; //$NON-NLS-1$
-    private static final String XCU_EXTENSION = "xcu"; //$NON-NLS-1$
-    
     private Combo mProjectsList;
     private ResourceTreeAndListGroup mResourceGroup;
     private Combo mDestinationCombo;
@@ -163,11 +160,12 @@ public class UnoPackageExportPage extends WizardPage {
         
         // Select the XCU / XCS files by default
         IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject( mSelectedProject.getName() );
-        FilesFinder finder = new FilesFinder( new String[] { XCU_EXTENSION, XCS_EXTENSION } );
+        FilesFinder finder = new FilesFinder( new String[] { IUnoidlProject.XCU_EXTENSION, IUnoidlProject.XCS_EXTENSION } );
         try {
+        	finder.addExclude(mSelectedProject.getDistFolder().getFullPath());
             prj.accept( finder );
         } catch (CoreException e) {
-            // Nothing to log here
+            PluginLogger.error("Could not visit the project's content.", e);
         }
         
         ArrayList< IFile > files = finder.getResults();
@@ -521,7 +519,7 @@ public class UnoPackageExportPage extends WizardPage {
          */
         public void run() {
             if (mOOo.canManagePackages()) {
-                mOOo.updatePackage(mDest);
+                mOOo.updatePackage(mDest, null);
             }
         }
     }
diff --git a/cpp/META-INF/MANIFEST.MF b/cpp/META-INF/MANIFEST.MF
index f038538..098ff48 100644
--- a/cpp/META-INF/MANIFEST.MF
+++ b/cpp/META-INF/MANIFEST.MF
@@ -13,6 +13,7 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.1",
  org.eclipse.cdt.ui;bundle-version="5.1.0",
  org.eclipse.ui.ide;bundle-version="3.5.0",
- org.eclipse.ui.cheatsheets
+ org.eclipse.ui.cheatsheets,
+ org.eclipse.debug.core
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Bundle-ActivationPolicy: lazy
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/Language.java b/cpp/source/org/openoffice/ide/eclipse/cpp/Language.java
index dc2da7d..624c281 100644
--- a/cpp/source/org/openoffice/ide/eclipse/cpp/Language.java
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/Language.java
@@ -30,6 +30,12 @@
  ************************************************************************/
 package org.openoffice.ide.eclipse.cpp;
 
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
 import org.openoffice.ide.eclipse.core.model.language.AbstractLanguage;
 import org.openoffice.ide.eclipse.core.model.language.ILanguageBuilder;
 import org.openoffice.ide.eclipse.core.model.language.IProjectHandler;
@@ -38,7 +44,7 @@ import org.openoffice.ide.eclipse.core.model.language.IProjectHandler;
  * Class for the extension point.
  * 
  * @author cbosdonnat
- *
+ * 
  */
 public class Language extends AbstractLanguage {
 
@@ -46,14 +52,26 @@ public class Language extends AbstractLanguage {
      * {@inheritDoc}
      */
     public ILanguageBuilder getLanguageBuidler() {
-        return new CppBuilder( );
+        return new CppBuilder();
     }
 
     /**
      * {@inheritDoc}
      */
     public IProjectHandler getProjectHandler() {
-        return new CppProjectHandler( );
+        return new CppProjectHandler();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void connectDebuggerToOpenOffice(IUnoidlProject pPrj, ILaunch pLaunch, IPath pUserInstallation,
+                    IProgressMonitor pMonitor) {
+        throw new RuntimeException("Not yet supported!");
     }
 
+    @Override
+    public void configureSourceLocator(ILaunchConfigurationWorkingCopy pConfiguration) throws CoreException {
+        throw new RuntimeException("Not yet implemented!");
+    };
 }
diff --git a/java/META-INF/MANIFEST.MF b/java/META-INF/MANIFEST.MF
index d74c71c..14d4005 100644
--- a/java/META-INF/MANIFEST.MF
+++ b/java/META-INF/MANIFEST.MF
@@ -16,6 +16,8 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.jface.text,
  org.eclipse.jdt.junit;bundle-version="3.5.0",
  org.eclipse.ui.ide,
- org.eclipse.ui.cheatsheets
+ org.eclipse.ui.cheatsheets,
+ org.eclipse.debug.core,
+ org.eclipse.jdt.debug.ui;bundle-version="3.4.1"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/java/source/org/openoffice/ide/eclipse/java/JavaDebugExtraOptionsProvider.java b/java/source/org/openoffice/ide/eclipse/java/JavaDebugExtraOptionsProvider.java
new file mode 100644
index 0000000..fc1843c
--- /dev/null
+++ b/java/source/org/openoffice/ide/eclipse/java/JavaDebugExtraOptionsProvider.java
@@ -0,0 +1,34 @@
+package org.openoffice.ide.eclipse.java;
+
+import org.openoffice.ide.eclipse.core.helpers.SystemHelper;
+import org.openoffice.ide.eclipse.core.model.config.IExtraOptionsProvider;
+
+/**
+ * Adds extra env variables to start OpenOffice with Java setup to run in debug mode.
+ * 
+ * @author cdan
+ * 
+ */
+public class JavaDebugExtraOptionsProvider implements IExtraOptionsProvider {
+
+    private String mPort;
+
+    /**
+     * 
+     * @param pPort
+     *            the port to listen to.
+     */
+    public JavaDebugExtraOptionsProvider(String pPort) {
+        this.mPort = pPort;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String[] addEnv(String[] pEnv) {
+        pEnv = SystemHelper.addEnv(pEnv, "JAVA_TOOL_OPTIONS", "\"-Xdebug\" "
+                        + "\"-Xrunjdwp:transport=dt_socket,address=localhost:" + mPort + "\"", null);
+        return pEnv;
+    }
+
+}
diff --git a/java/source/org/openoffice/ide/eclipse/java/Language.java b/java/source/org/openoffice/ide/eclipse/java/Language.java
index 6245535..c8b9352 100644
--- a/java/source/org/openoffice/ide/eclipse/java/Language.java
+++ b/java/source/org/openoffice/ide/eclipse/java/Language.java
@@ -43,6 +43,29 @@
  ************************************************************************/
 package org.openoffice.ide.eclipse.java;
 
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IPersistableSourceLocator;
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
+import org.eclipse.debug.core.sourcelookup.ISourcePathComputer;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IVMConnector;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.sourcelookup.containers.JavaSourceLookupParticipant;
+import org.openoffice.ide.eclipse.core.PluginLogger;
+import org.openoffice.ide.eclipse.core.launch.office.IOfficeLaunchConstants;
+import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
 import org.openoffice.ide.eclipse.core.model.language.AbstractLanguage;
 import org.openoffice.ide.eclipse.core.model.language.ILanguageBuilder;
 import org.openoffice.ide.eclipse.core.model.language.IProjectHandler;
@@ -54,6 +77,8 @@ import org.openoffice.ide.eclipse.core.model.language.IProjectHandler;
  */
 public class Language extends AbstractLanguage {
 
+    private static final String DEFAULT_JAVA_DEBUG_PORT = "7861";
+
     /**
      * {@inheritDoc}
      */
@@ -67,4 +92,39 @@ public class Language extends AbstractLanguage {
     public IProjectHandler getProjectHandler() {
         return new JavaProjectHandler();
     }
-}
+
+    /**
+     * {@inheritDoc}
+     */
+    public void connectDebuggerToOpenOffice(IUnoidlProject pPrj, ILaunch pLaunch, IPath pUserInstallation,
+                    IProgressMonitor pMonitor) {
+
+        try {
+            // org.eclipse.jdt.launching.socketListenConnector
+            // SocketListenConnector
+            String connectorId = "org.eclipse.jdt.launching.socketListenConnector";
+            IVMConnector connector = JavaRuntime.getVMConnector(connectorId);
+            Map<String, String> argMap = new HashMap<String, String>();
+            argMap.put("timeout", "80000");
+            //FIXME implement some kind of port pickup/retry mechanism in case the default port is already used.
+            argMap.put("port", DEFAULT_JAVA_DEBUG_PORT);
+
+            connector.connect(argMap, pMonitor, pLaunch);
+
+            pPrj.getOOo().runOpenOffice(pPrj, pLaunch, pUserInstallation,
+                            new JavaDebugExtraOptionsProvider(DEFAULT_JAVA_DEBUG_PORT), pMonitor);
+        } catch (Exception e) {
+            PluginLogger.error("Could not start remote debugger.", e);
+        }
+    }
+
+    @Override
+    public void configureSourceLocator(ILaunchConfigurationWorkingCopy pConfiguration) throws CoreException {
+        String projectName = pConfiguration.getAttribute(IOfficeLaunchConstants.PROJECT_NAME, "");
+        pConfiguration.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID,
+                        "org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector");
+        pConfiguration.setAttribute(ISourcePathComputer.ATTR_SOURCE_PATH_COMPUTER_ID,
+                        "org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer");
+        pConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName);
+    };
+}
\ No newline at end of file
commit 149fecca8d385a6f48b16e9b6eb6e43406b6a763
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Wed Jun 16 14:44:49 2010 +0200

    Some project config for the code formatting / cleanup

diff --git a/build/code-cleanup.xml b/build/code-cleanup.xml
new file mode 100644
index 0000000..30a4cec
--- /dev/null
+++ b/build/code-cleanup.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="2">
+<profile kind="CleanUpProfile" name="OOEclipse" version="2">
+<setting id="cleanup.remove_unused_private_fields" value="true"/>
+<setting id="cleanup.always_use_parentheses_in_expressions" value="false"/>
+<setting id="cleanup.never_use_blocks" value="false"/>
+<setting id="cleanup.remove_unused_private_methods" value="true"/>
+<setting id="cleanup.add_missing_deprecated_annotations" value="true"/>
+<setting id="cleanup.convert_to_enhanced_for_loop" value="false"/>
+<setting id="cleanup.remove_unnecessary_nls_tags" value="true"/>
+<setting id="cleanup.sort_members" value="false"/>
+<setting id="cleanup.remove_unused_local_variables" value="false"/>
+<setting id="cleanup.never_use_parentheses_in_expressions" value="true"/>
+<setting id="cleanup.remove_unused_private_members" value="false"/>
+<setting id="cleanup.remove_unnecessary_casts" value="true"/>
+<setting id="cleanup.make_parameters_final" value="false"/>
+<setting id="cleanup.use_this_for_non_static_field_access" value="false"/>
+<setting id="cleanup.remove_private_constructors" value="true"/>
+<setting id="cleanup.use_blocks" value="true"/>
+<setting id="cleanup.always_use_this_for_non_static_method_access" value="false"/>
+<setting id="cleanup.remove_trailing_whitespaces_all" value="true"/>
+<setting id="cleanup.always_use_this_for_non_static_field_access" value="false"/>
+<setting id="cleanup.use_this_for_non_static_field_access_only_if_necessary" value="true"/>
+<setting id="cleanup.add_default_serial_version_id" value="false"/>
+<setting id="cleanup.make_type_abstract_if_missing_method" value="false"/>
+<setting id="cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class" value="true"/>
+<setting id="cleanup.make_variable_declarations_final" value="false"/>
+<setting id="cleanup.add_missing_nls_tags" value="false"/>
+<setting id="cleanup.format_source_code" value="false"/>
+<setting id="cleanup.qualify_static_method_accesses_with_declaring_class" value="false"/>
+<setting id="cleanup.add_missing_override_annotations" value="true"/>
+<setting id="cleanup.remove_unused_private_types" value="true"/>
+<setting id="cleanup.add_missing_methods" value="false"/>
+<setting id="cleanup.make_local_variable_final" value="true"/>
+<setting id="cleanup.correct_indentation" value="true"/>
+<setting id="cleanup.remove_unused_imports" value="true"/>
+<setting id="cleanup.remove_trailing_whitespaces_ignore_empty" value="false"/>
+<setting id="cleanup.make_private_fields_final" value="true"/>
+<setting id="cleanup.add_generated_serial_version_id" value="true"/>
+<setting id="cleanup.organize_imports" value="true"/>
+<setting id="cleanup.remove_trailing_whitespaces" value="true"/>
+<setting id="cleanup.sort_members_all" value="false"/>
+<setting id="cleanup.use_blocks_only_for_return_and_throw" value="false"/>
+<setting id="cleanup.add_missing_annotations" value="true"/>
+<setting id="cleanup.use_parentheses_in_expressions" value="true"/>
+<setting id="cleanup.qualify_static_field_accesses_with_declaring_class" value="false"/>
+<setting id="cleanup.use_this_for_non_static_method_access_only_if_necessary" value="true"/>
+<setting id="cleanup.use_this_for_non_static_method_access" value="false"/>
+<setting id="cleanup.qualify_static_member_accesses_through_instances_with_declaring_class" value="true"/>
+<setting id="cleanup.add_serial_version_id" value="true"/>
+<setting id="cleanup.format_source_code_changes_only" value="false"/>
+<setting id="cleanup.qualify_static_member_accesses_with_declaring_class" value="true"/>
+<setting id="cleanup.always_use_blocks" value="true"/>
+</profile>
+</profiles>
diff --git a/build/formater.xml b/build/formater.xml
new file mode 100644
index 0000000..6555998
--- /dev/null
+++ b/build/formater.xml
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="11">
+<profile kind="CodeFormatterProfile" name="OOEclipse" version="11">
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+</profile>
+</profiles>
diff --git a/core/.settings/org.eclipse.jdt.core.prefs b/core/.settings/org.eclipse.jdt.core.prefs
index 46415b0..84ae557 100644
--- a/core/.settings/org.eclipse.jdt.core.prefs
+++ b/core/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon Jul 27 15:40:05 CEST 2009
+#Wed Jun 16 14:43:40 CEST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.codeComplete.argumentPrefixes=p
 org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -8,8 +8,268 @@ org.eclipse.jdt.core.codeComplete.localPrefixes=
 org.eclipse.jdt.core.codeComplete.localSuffixes=
 org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=s
 org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
 org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/core/.settings/org.eclipse.jdt.ui.prefs b/core/.settings/org.eclipse.jdt.ui.prefs
index 2f86f1d..b5aa7ed 100644
--- a/core/.settings/org.eclipse.jdt.ui.prefs
+++ b/core/.settings/org.eclipse.jdt.ui.prefs
@@ -1,8 +1,62 @@
-#Mon Nov 17 10:44:04 CET 2008
+#Wed Jun 16 14:43:40 CEST 2010
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_OOEclipse
+cleanup_settings_version=2
 eclipse.preferences.version=1
+formatter_profile=_OOEclipse
+formatter_settings_version=11
 org.eclipse.jdt.ui.exception.name=e
 org.eclipse.jdt.ui.gettersetter.use.is=true
 org.eclipse.jdt.ui.javadoc=false
 org.eclipse.jdt.ui.keywordthis=false
 org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_
 context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecom
 ment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="c
 lassbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStac
 kTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.tex
 t.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/cpp/.settings/org.eclipse.jdt.core.prefs b/cpp/.settings/org.eclipse.jdt.core.prefs
index 1266e34..ee7c691 100644
--- a/cpp/.settings/org.eclipse.jdt.core.prefs
+++ b/cpp/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Nov 10 10:56:49 CET 2009
+#Wed Jun 16 14:39:29 CEST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -6,3 +6,261 @@ org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/cpp/.settings/org.eclipse.jdt.ui.prefs b/cpp/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..90c6cfc
--- /dev/null
+++ b/cpp/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,56 @@
+#Wed Jun 16 14:43:55 CEST 2010
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_OOEclipse
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_OOEclipse
+formatter_settings_version=11
diff --git a/java/.settings/org.eclipse.jdt.core.prefs b/java/.settings/org.eclipse.jdt.core.prefs
index daa29bc..8293bf6 100644
--- a/java/.settings/org.eclipse.jdt.core.prefs
+++ b/java/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Sat Oct 03 10:15:46 CEST 2009
+#Wed Jun 16 14:39:36 CEST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -10,3 +10,261 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=4
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/java/.settings/org.eclipse.jdt.ui.prefs b/java/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..a9ed66d
--- /dev/null
+++ b/java/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,56 @@
+#Wed Jun 16 14:44:04 CEST 2010
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_OOEclipse
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_OOEclipse
+formatter_settings_version=11
commit aefcf86e9709b0d7b4729548f4a83f4938af1d64
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Wed Jun 16 12:39:10 2010 +0200

    Fixed some style problems

diff --git a/core/source/org/openoffice/ide/eclipse/core/builders/TypesBuilder.java b/core/source/org/openoffice/ide/eclipse/core/builders/TypesBuilder.java
index f1c7c7f..d1036c2 100644
--- a/core/source/org/openoffice/ide/eclipse/core/builders/TypesBuilder.java
+++ b/core/source/org/openoffice/ide/eclipse/core/builders/TypesBuilder.java
@@ -106,6 +106,7 @@ public class TypesBuilder extends IncrementalProjectBuilder {
     /**
      * {@inheritDoc}
      */
+    @SuppressWarnings("unchecked")
     protected IProject[] build(int pKind, Map pArgs, IProgressMonitor pMonitor) throws CoreException {
         
         mChangedIdl = false;
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java b/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java
index 17012ef..f9690fa 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java
@@ -103,9 +103,9 @@ public class UnoidlProjectHelper {
      */
     public static final String IDL_BASIS = "/idl"; //$NON-NLS-1$
 
-	public static final String DIST_BASIS = "dist";
+    public static final String DIST_BASIS = "dist"; //$NON-NLS-1$
 
-	public static final String OO_PROFILE_BASIS = ".ooo-debug";
+    public static final String OO_PROFILE_BASIS = ".ooo-debug"; //$NON-NLS-1$
     
     /**
      * Create a default configuration file for UNO-IDL projects.
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
index 678d06e..a8d8a26 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
@@ -365,40 +365,41 @@ public abstract class AbstractOOo implements IOOo, ITableElement {
     }
     
     public void runOpenOffice(IUnoidlProject pPrj, 
-    		ILaunch pLaunch, IPath userInstallation, IProgressMonitor pMonitor) {
-		try {
-			IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject(
-					pPrj.getName());
-			String[] env = pPrj.getLanguage().getLanguageBuidler().getBuildEnv(
-					pPrj);
+            ILaunch pLaunch, IPath pUserInstallation, IProgressMonitor pMonitor) {
+        try {
+            IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject(
+                    pPrj.getName());
+            String[] env = pPrj.getLanguage().getLanguageBuidler().getBuildEnv(
+                    pPrj);
 
-			String pathSeparator = System.getProperty("path.separator");
-			String[] sPaths = pPrj.getOOo().getBinPath();
-			StringBuilder sPathValue = new StringBuilder();
-			for (String sPath : sPaths) {
-				sPathValue.append(sPath);
-				sPathValue.append(pathSeparator);
-			}
+            String pathSeparator = System.getProperty("path.separator"); //$NON-NLS-1$
+            String[] sPaths = pPrj.getOOo().getBinPath();
+            StringBuilder sPathValue = new StringBuilder();
+            for (String sPath : sPaths) {
+                sPathValue.append(sPath);
+                sPathValue.append(pathSeparator);
+            }
 
-			String command = "soffice.bin";
-			
-			env = SystemHelper.addEnv(env, "PATH", sPathValue.toString(), pathSeparator);
-			if (null != userInstallation) {
-				// We have to turn the path to a URI something like file:///foo/bar/.ooo-debug
-				//TODO find a better way to get the proper URI.
-				URI userInstallationURI = new URI("file", "", userInstallation.toFile().toURI().getPath(), null);
-				env = SystemHelper.addEnv(env, "UserInstallation", userInstallationURI.toString(), null);
-				command += " -nofirststartwiozard ";
-			}
+            String command = "soffice.bin"; //$NON-NLS-1$
+            
+            env = SystemHelper.addEnv(env, "PATH", sPathValue.toString(), pathSeparator); //$NON-NLS-1$
+            if (null != pUserInstallation) {
+                // We have to turn the path to a URI something like file:///foo/bar/.ooo-debug
+                //TODO find a better way to get the proper URI.
+                URI userInstallationURI = new URI("file", new String(), //$NON-NLS-1$
+                        pUserInstallation.toFile().toURI().getPath(), null);
+                env = SystemHelper.addEnv(env, "UserInstallation", userInstallationURI.toString(), null); //$NON-NLS-1$
+                command += " -nofirststartwiozard "; //$NON-NLS-1$
+            }
 
-			PluginLogger.debug("Launching OpenOffice from commandline: " + command);
-			Process p = pPrj.getSdk().runToolWithEnv(prj, pPrj.getOOo(),
-					command, env, pMonitor);
-			DebugPlugin.newProcess(pLaunch, p, Messages
-					.getString("AbstractOOo.OpenOfficeProcessName")); //$NON-NLS-1$
-		} catch (Exception e) {
-			PluginLogger.error("Error running OpenOffice", e);
-		}
+            PluginLogger.debug("Launching OpenOffice from commandline: " + command); //$NON-NLS-1$
+            Process p = pPrj.getSdk().runToolWithEnv(prj, pPrj.getOOo(),
+                    command, env, pMonitor);
+            DebugPlugin.newProcess(pLaunch, p, Messages
+                    .getString("AbstractOOo.OpenOfficeProcessName")); //$NON-NLS-1$
+        } catch (Exception e) {
+            PluginLogger.error("Error running OpenOffice", e);
+        }
     }
     
     /**
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
index ababe90..eb1c39b 100755
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
@@ -471,16 +471,16 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
         return getFolder(getBuildPath().append(UnoidlProjectHelper.URD_BASIS)).getProjectRelativePath();
     }
     
-	public IPath getDistPath() {
-		return getFolder(getBuildPath().append(UnoidlProjectHelper.DIST_BASIS))
-				.getProjectRelativePath();
-	}
-	
-	public IPath getOpenOfficeUserProfilePath() {
-		return getFolder(
-				getDistPath().append(UnoidlProjectHelper.OO_PROFILE_BASIS))
-				.getProjectRelativePath();
-	}
+    public IPath getDistPath() {
+        return getFolder(getBuildPath().append(UnoidlProjectHelper.DIST_BASIS))
+                .getProjectRelativePath();
+    }
+    
+    public IPath getOpenOfficeUserProfilePath() {
+        return getFolder(
+                getDistPath().append(UnoidlProjectHelper.OO_PROFILE_BASIS))
+                .getProjectRelativePath();
+    }
 
     /**
      * {@inheritDoc}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java
index 153c548..05aa460 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java
@@ -2,7 +2,7 @@ package org.openoffice.ide.eclipse.core.launch.office;
 
 public interface IOfficeLaunchConstants {
 
-	String PROJECT_NAME = "project_name";
-	String CLEAN_USER_INSTALLATION = "useCleanUserInstallation";
+    String PROJECT_NAME = "project_name"; //$NON-NLS-1$
+    String CLEAN_USER_INSTALLATION = "useCleanUserInstallation"; //$NON-NLS-1$
 
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java
index c6789b2..6921e21 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java
@@ -6,17 +6,16 @@ import org.eclipse.debug.ui.ILaunchConfigurationDialog;
 import org.eclipse.debug.ui.ILaunchConfigurationTab;
 
 public class LaunchConfigurationTabs extends
-		AbstractLaunchConfigurationTabGroup {
+        AbstractLaunchConfigurationTabGroup {
 
-	/**
-	 * {@inheritDoc}
-	 */
-	public void createTabs(ILaunchConfigurationDialog pDialog, String pMode) {
-		ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
-				new OfficeTab(), new CommonTab() };
+    /**
+     * {@inheritDoc}
+     */
+    public void createTabs(ILaunchConfigurationDialog pDialog, String pMode) {
+        ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+            new OfficeTab(), new CommonTab() };
 
-		setTabs(tabs);
-
-	}
+        setTabs(tabs);
 
+    }
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
index 3d1871a..b653dde 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
@@ -3,21 +3,27 @@ package org.openoffice.ide.eclipse.core.launch.office;
 import org.eclipse.osgi.util.NLS;
 
 public class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.openoffice.ide.eclipse.core.launch.office.messages"; //$NON-NLS-1$
-	public static String OfficeLaunchDelegate_LaunchError;
-	public static String OfficeLaunchDelegate_LaunchErrorTitle;
-	public static String OfficeTab_Options;
-	public static String OfficeTab_Configurationerror;
-	public static String OfficeTab_ProjectNameLabel;
-	public static String OfficeTab_Title;
-	public static String OfficeTab_UnoProject;
-	public static String OfficeTab_ChkUseCleanUserInstallation;
-	public static String OfficeTab_ChkUseCleanUserInstallation_ToolTip;
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
+    
+    public static String OfficeLaunchDelegate_LaunchError;
+    public static String OfficeLaunchDelegate_LaunchErrorTitle;
+    public static String OfficeTab_Options;
+    public static String OfficeTab_Configurationerror;
+    public static String OfficeTab_ProjectNameLabel;
+    public static String OfficeTab_Title;
+    public static String OfficeTab_UnoProject;
+    public static String OfficeTab_ChkUseCleanUserInstallation;
+    public static String OfficeTab_ChkUseCleanUserInstallation_ToolTip;
+    
+    private static final String BUNDLE_NAME = "org.openoffice.ide.eclipse.core.launch.office.messages"; //$NON-NLS-1$
+    
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
 
-	private Messages() {
-	}
+    /**
+     * Private constructor.
+     */
+    private Messages() {
+    }
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
index 2e42086..5bddc5c 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
@@ -18,70 +18,70 @@ import org.openoffice.ide.eclipse.core.model.language.ILanguageBuilder;
 
 public class OfficeLaunchDelegate extends LaunchConfigurationDelegate {
 
-	/**
-	 * Export the .oxt file, deploy it in openoffice, run openoffice.
-	 */
-	private static final int TASK_UNITS = 3;
+    /**
+     * Export the .oxt file, deploy it in openoffice, run openoffice.
+     */
+    private static final int TASK_UNITS = 3;
 
-	/**
-	 * {@inheritDoc}
-	 */
-	public void launch(ILaunchConfiguration pConfiguration, String pMode,
-			ILaunch pLaunch, IProgressMonitor pMonitor) throws CoreException {
-		if (pMonitor == null) {
-			pMonitor = new NullProgressMonitor();
-		}
+    /**
+     * {@inheritDoc}
+     */
+    public void launch(ILaunchConfiguration pConfiguration, String pMode,
+            ILaunch pLaunch, IProgressMonitor pMonitor) throws CoreException {
+        if (pMonitor == null) {
+            pMonitor = new NullProgressMonitor();
+        }
 
-		try {
-			pMonitor.beginTask(MessageFormat.format("{0}...", //$NON-NLS-1$
-					new Object[] { pConfiguration.getName() }), TASK_UNITS);
-			// check for cancellation
-			if (pMonitor.isCanceled()) {
-				return;
-			}
+        try {
+            pMonitor.beginTask(MessageFormat.format("{0}...", //$NON-NLS-1$
+                    new Object[] { pConfiguration.getName() }), TASK_UNITS);
+            // check for cancellation
+            if (pMonitor.isCanceled()) {
+                return;
+            }
 
-			String prjName = pConfiguration.getAttribute(
-					IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
-			boolean useCleanUserInstalation = pConfiguration.getAttribute(
-					IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false);
-			
-			IUnoidlProject prj = ProjectsManager.getProject(prjName);
+            String prjName = pConfiguration.getAttribute(
+                    IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
+            boolean useCleanUserInstalation = pConfiguration.getAttribute(
+                    IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false);
+            
+            IUnoidlProject prj = ProjectsManager.getProject(prjName);
 
-			if (null != prj) {
-				try {
-					ILanguageBuilder langBuilder = prj.getLanguage()
-							.getLanguageBuidler();
-					langBuilder.createLibrary(prj);
+            if (null != prj) {
+                try {
+                    ILanguageBuilder langBuilder = prj.getLanguage()
+                            .getLanguageBuidler();
+                    langBuilder.createLibrary(prj);
 
-					// Run an OpenOffice instance
-					IPath userInstallation = null;
-					if (useCleanUserInstalation) {
-						IFolder userInstallationFolder = prj.getFolder(prj
-								.getOpenOfficeUserProfilePath());
-						//TODO find  better way to make sure the folder exists.
-						if (!userInstallationFolder.exists()) {
-							((IFolder)userInstallationFolder.getParent()).create(true, true, null);
-							userInstallationFolder.create(true, true, null);
-						}
-						userInstallation = userInstallationFolder.getLocation();
-					}
-							
-					prj.getOOo().runOpenOffice(prj, pLaunch, userInstallation,
-							pMonitor);
-				} catch (Exception e) {
-					Display.getDefault().asyncExec(new Runnable() {
+                    // Run an OpenOffice instance
+                    IPath userInstallation = null;
+                    if (useCleanUserInstalation) {
+                        IFolder userInstallationFolder = prj.getFolder(prj
+                                .getOpenOfficeUserProfilePath());
+                        //TODO find  better way to make sure the folder exists.
+                        if (!userInstallationFolder.exists()) {
+                            ((IFolder)userInstallationFolder.getParent()).create(true, true, null);
+                            userInstallationFolder.create(true, true, null);
+                        }
+                        userInstallation = userInstallationFolder.getLocation();
+                    }
+                            
+                    prj.getOOo().runOpenOffice(prj, pLaunch, userInstallation,
+                            pMonitor);
+                } catch (Exception e) {
+                    Display.getDefault().asyncExec(new Runnable() {
 
-						public void run() {
-							MessageDialog.openError(Display.getDefault()
-									.getActiveShell(), Messages.OfficeLaunchDelegate_LaunchErrorTitle, 
-									Messages.OfficeLaunchDelegate_LaunchError);     
-						}
-					});
-				}
-			}
-		} finally {
-			pMonitor.done();
-		}
-	}
+                        public void run() {
+                            MessageDialog.openError(Display.getDefault()
+                                    .getActiveShell(), Messages.OfficeLaunchDelegate_LaunchErrorTitle, 
+                                    Messages.OfficeLaunchDelegate_LaunchError);     
+                        }
+                    });
+                }
+            }
+        } finally {
+            pMonitor.done();
+        }
+    }
 
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
index 2b96822..1b0b5b9 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
@@ -25,133 +25,133 @@ import org.openoffice.ide.eclipse.core.model.ProjectsManager;
 
 public class OfficeTab extends AbstractLaunchConfigurationTab {
 
-	private static final int LAYOUT_COLUMNS = 3;
-	private Text mProjectTxt;
-	private Button mProjectBtn;
-	private Button useCleanUserInstallation;
-	private SelectionListener mListener = new ChangeListener();
-
-	public void createControl(Composite pParent) {
-		Composite comp = new Composite(pParent, SWT.NONE);
-		comp.setLayoutData(new GridData(GridData.FILL_BOTH));
-		comp.setLayout(new GridLayout());
-
-		createProjectGroup(comp);
-
-		createOptionsGroup(comp);
-
-		setControl(comp);
-	}
-
-	private void createOptionsGroup(Composite parent) {
-		Group group = new Group(parent, SWT.NONE);
-		group.setText(Messages.OfficeTab_Options);
-		group.setLayout(new GridLayout());
-		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		useCleanUserInstallation = new Button(group, SWT.CHECK);
-		useCleanUserInstallation
-				.setText(Messages.OfficeTab_ChkUseCleanUserInstallation);
-		useCleanUserInstallation.addSelectionListener(mListener);
-		useCleanUserInstallation.setToolTipText(Messages.OfficeTab_ChkUseCleanUserInstallation_ToolTip);
-	}
-
-	private void createProjectGroup(Composite parent) {
-		Group group = new Group(parent, SWT.NONE);
-		group.setText(Messages.OfficeTab_UnoProject);
-		group.setLayout(new GridLayout());
-		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		Composite field = new Composite(group, SWT.NONE);
-		field.setLayout(new GridLayout(LAYOUT_COLUMNS, false));
-		field.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-		Label lbl = new Label(field, SWT.NONE);
-		lbl.setText(Messages.OfficeTab_ProjectNameLabel);
-		lbl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
-		mProjectTxt = new Text(field, SWT.SINGLE | SWT.BORDER);
-		mProjectTxt.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
-				| GridData.GRAB_HORIZONTAL));
-		// mProjectTxt.addModifyListener(mListener);
-
-		mProjectBtn = new Button(field, SWT.PUSH);
-		mProjectBtn.setText("...");
-		mProjectBtn.addSelectionListener(mListener);
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	public String getName() {
-		return Messages.OfficeTab_Title;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	public void initializeFrom(ILaunchConfiguration pConfiguration) {
-		try {
-			mProjectTxt.setText(pConfiguration.getAttribute(
-					IOfficeLaunchConstants.PROJECT_NAME, ""));
-			useCleanUserInstallation.setSelection(pConfiguration.getAttribute(
-					IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false));
-		} catch (CoreException e) {
-			PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
-		}
-	}
-
-	public void performApply(ILaunchConfigurationWorkingCopy pConfiguration) {
-		pConfiguration.setAttribute(IOfficeLaunchConstants.PROJECT_NAME,
-				mProjectTxt.getText().trim());
-		pConfiguration.setAttribute(
-				IOfficeLaunchConstants.CLEAN_USER_INSTALLATION,
-				useCleanUserInstallation.getSelection());
-	}
-
-	public void setDefaults(ILaunchConfigurationWorkingCopy pConfiguration) {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public boolean isValid(ILaunchConfiguration pLaunchConfig) {
-		boolean valid = false;
-
-		try {
-
-			boolean projectSet = !pLaunchConfig.getAttribute(
-					IOfficeLaunchConstants.PROJECT_NAME, "").equals("");//$NON-NLS-1$ //$NON-NLS-2$
-			if (projectSet) {
-				String name = pLaunchConfig.getAttribute(
-						IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
-				valid = ProjectsManager.getProject(name) != null;
-			}
-		} catch (CoreException e) {
-			PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
-		}
-
-		return valid;
-	}
-
-	private class ChangeListener extends SelectionAdapter {
-		public void widgetSelected(SelectionEvent event) {
-			if (event.getSource().equals(mProjectBtn)) {
-				ILabelProvider labelProvider = new UnoProjectLabelProvider();
-				ElementListSelectionDialog dialog = new ElementListSelectionDialog(
-						getShell(), labelProvider);
-				dialog.setTitle("ProjectChooserTitle"); //$NON-NLS-1$
-				dialog.setMessage("ProjectChooserMessage"); //$NON-NLS-1$
-				dialog.setElements(ProjectsManager.getProjects());
-
-				if (dialog.open() == Window.OK) {
-					IUnoidlProject mProject = (IUnoidlProject) dialog
-							.getFirstResult();
-					mProjectTxt.setText(mProject.getName());
-				}
-			}
-			setDirty(true);
-			getLaunchConfigurationDialog().updateButtons();
-		}
-	}
+    private static final int LAYOUT_COLUMNS = 3;
+    private Text mProjectTxt;
+    private Button mProjectBtn;
+    private Button mUseCleanUserInstallation;
+    private SelectionListener mListener = new ChangeListener();
+
+    public void createControl(Composite pParent) {
+        Composite comp = new Composite(pParent, SWT.NONE);
+        comp.setLayoutData(new GridData(GridData.FILL_BOTH));
+        comp.setLayout(new GridLayout());
+
+        createProjectGroup(comp);
+
+        createOptionsGroup(comp);
+
+        setControl(comp);
+    }
+
+    private void createOptionsGroup(Composite pParent) {
+        Group group = new Group(pParent, SWT.NONE);
+        group.setText(Messages.OfficeTab_Options);
+        group.setLayout(new GridLayout());
+        group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        mUseCleanUserInstallation = new Button(group, SWT.CHECK);
+        mUseCleanUserInstallation
+                .setText(Messages.OfficeTab_ChkUseCleanUserInstallation);
+        mUseCleanUserInstallation.addSelectionListener(mListener);
+        mUseCleanUserInstallation.setToolTipText(Messages.OfficeTab_ChkUseCleanUserInstallation_ToolTip);
+    }
+
+    private void createProjectGroup(Composite pParent) {
+        Group group = new Group(pParent, SWT.NONE);
+        group.setText(Messages.OfficeTab_UnoProject);
+        group.setLayout(new GridLayout());
+        group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        Composite field = new Composite(group, SWT.NONE);
+        field.setLayout(new GridLayout(LAYOUT_COLUMNS, false));
+        field.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        Label lbl = new Label(field, SWT.NONE);
+        lbl.setText(Messages.OfficeTab_ProjectNameLabel);
+        lbl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
+
+        mProjectTxt = new Text(field, SWT.SINGLE | SWT.BORDER);
+        mProjectTxt.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
+                | GridData.GRAB_HORIZONTAL));
+        // mProjectTxt.addModifyListener(mListener);
+
+        mProjectBtn = new Button(field, SWT.PUSH);
+        mProjectBtn.setText("..."); //$NON-NLS-1$
+        mProjectBtn.addSelectionListener(mListener);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName() {
+        return Messages.OfficeTab_Title;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void initializeFrom(ILaunchConfiguration pConfiguration) {
+        try {
+            mProjectTxt.setText(pConfiguration.getAttribute(
+                    IOfficeLaunchConstants.PROJECT_NAME, new String()));
+            mUseCleanUserInstallation.setSelection(pConfiguration.getAttribute(
+                    IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false));
+        } catch (CoreException e) {
+            PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
+        }
+    }
+
+    public void performApply(ILaunchConfigurationWorkingCopy pConfiguration) {
+        pConfiguration.setAttribute(IOfficeLaunchConstants.PROJECT_NAME,
+                mProjectTxt.getText().trim());
+        pConfiguration.setAttribute(
+                IOfficeLaunchConstants.CLEAN_USER_INSTALLATION,
+                mUseCleanUserInstallation.getSelection());
+    }
+
+    public void setDefaults(ILaunchConfigurationWorkingCopy pConfiguration) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public boolean isValid(ILaunchConfiguration pLaunchConfig) {
+        boolean valid = false;
+
+        try {
+
+            boolean projectSet = !pLaunchConfig.getAttribute(
+                    IOfficeLaunchConstants.PROJECT_NAME, "").equals("");//$NON-NLS-1$ //$NON-NLS-2$
+            if (projectSet) {
+                String name = pLaunchConfig.getAttribute(
+                        IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
+                valid = ProjectsManager.getProject(name) != null;
+            }
+        } catch (CoreException e) {
+            PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
+        }
+
+        return valid;
+    }
+
+    private class ChangeListener extends SelectionAdapter {
+        public void widgetSelected(SelectionEvent pEvent) {
+            if (pEvent.getSource().equals(mProjectBtn)) {
+                ILabelProvider labelProvider = new UnoProjectLabelProvider();
+                ElementListSelectionDialog dialog = new ElementListSelectionDialog(
+                        getShell(), labelProvider);
+                dialog.setTitle("ProjectChooserTitle"); //$NON-NLS-1$
+                dialog.setMessage("ProjectChooserMessage"); //$NON-NLS-1$
+                dialog.setElements(ProjectsManager.getProjects());
+
+                if (dialog.open() == Window.OK) {
+                    IUnoidlProject mProject = (IUnoidlProject) dialog
+                            .getFirstResult();
+                    mProjectTxt.setText(mProject.getName());
+                }
+            }
+            setDirty(true);
+            getLaunchConfigurationDialog().updateButtons();
+        }
+    }
 }
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java b/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java
index 97615a0..93e760f 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java
@@ -244,19 +244,19 @@ public interface IUnoidlProject {
      */
     public IPath getUrdPath();
     
-	/**
-	 * @return the path to the project's folder containing the distribution .oxf
-	 *         file.
-	 */
-	public IPath getDistPath();
-	
-	/**
-	 * @return the path to the project's folder used to store the user profile
-	 *         when running/debugging OpenOffice in a clean environment. This
-	 *         way we do not mangle with the system wide installed, OpenOffice
-	 *         settings.
-	 */
-	public IPath getOpenOfficeUserProfilePath();
+    /**
+     * @return the path to the project's folder containing the distribution .oxf
+     *         file.
+     */
+    public IPath getDistPath();
+    
+    /**
+     * @return the path to the project's folder used to store the user profile
+     *         when running/debugging OpenOffice in a clean environment. This
+     *         way we do not mangle with the system wide installed, OpenOffice
+     *         settings.
+     */
+    public IPath getOpenOfficeUserProfilePath();
     
     //----------------------------------------------- Project resources getters
     
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java b/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
index a9db057..2d1c055 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
@@ -168,11 +168,11 @@ public interface IOOo {
      * 
      * @param pPrj the project to run
      * @param pLaunch the launcher to which we'll add our processes
-     * @param userInstallation the userInstallation folder to use. If null we'll go with the default system one.
+     * @param pUserInstallation the userInstallation folder to use. If null we'll go with the default system one.
      * @param pMonitor a monitor to follow the progress
      */
     public void runOpenOffice(IUnoidlProject pPrj,  
-            ILaunch pLaunch, IPath userInstallation, IProgressMonitor pMonitor);
+            ILaunch pLaunch, IPath pUserInstallation, IProgressMonitor pMonitor);
     
     /**
      * @return <code>true</code> if the OOo instance has a package manager.
diff --git a/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java b/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java
index a5071c7..11734e0 100644
--- a/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java
+++ b/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java
@@ -33,7 +33,6 @@ package org.openoffice.ide.eclipse.core.wizards.pages;
 import java.io.File;
 import java.text.MessageFormat;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 
 import org.eclipse.core.resources.IContainer;
@@ -46,8 +45,6 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.ICheckStateListener;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
commit fa618ee30db62de028b4822f5dacd4f60b7f0672
Author: cdan <cdan at savatech.ro>
Date:   Tue Jun 15 12:10:46 2010 +0300

    Added support for starting OpenOffice with a temporary user profile.

diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java b/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java
index 1e6878b..17012ef 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/helpers/UnoidlProjectHelper.java
@@ -102,6 +102,10 @@ public class UnoidlProjectHelper {
      * Project relative path to the idl root folder.
      */
     public static final String IDL_BASIS = "/idl"; //$NON-NLS-1$
+
+	public static final String DIST_BASIS = "dist";
+
+	public static final String OO_PROFILE_BASIS = ".ooo-debug";
     
     /**
      * Create a default configuration file for UNO-IDL projects.
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
index 529551d..678d06e 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
@@ -47,6 +47,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringWriter;
+import java.net.URI;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -57,6 +58,7 @@ import org.eclipse.core.runtime.Platform;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.swt.graphics.Image;
+import org.openoffice.ide.eclipse.core.PluginLogger;
 import org.openoffice.ide.eclipse.core.gui.ITableElement;
 import org.openoffice.ide.eclipse.core.internal.helpers.SystemHelper;
 import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
@@ -364,30 +366,39 @@ public abstract class AbstractOOo implements IOOo, ITableElement {
     
     public void runOpenOffice(IUnoidlProject pPrj, 
     		ILaunch pLaunch, IPath userInstallation, IProgressMonitor pMonitor) {
-    	IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject( pPrj.getName() );
-    	String[] env = pPrj.getLanguage().getLanguageBuidler().getBuildEnv(pPrj);
-    	
-    	String pathSeparator = System.getProperty("path.separator");
-    	String[] sPaths = pPrj.getOOo().getBinPath();
-    	StringBuilder sPathValue = new StringBuilder();
-		for (String sPath : sPaths) {
-    		sPathValue.append(sPath);
-    		sPathValue.append(pathSeparator);
-    	}
-    	
-		env = SystemHelper.addEnv(env, "PATH", sPathValue.toString(), pathSeparator);
-		if(null != userInstallation) {
-			env = SystemHelper.addEnv(env, "UserInstallation", userInstallation.toOSString(), null);
+		try {
+			IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject(
+					pPrj.getName());
+			String[] env = pPrj.getLanguage().getLanguageBuidler().getBuildEnv(
+					pPrj);
+
+			String pathSeparator = System.getProperty("path.separator");
+			String[] sPaths = pPrj.getOOo().getBinPath();
+			StringBuilder sPathValue = new StringBuilder();
+			for (String sPath : sPaths) {
+				sPathValue.append(sPath);
+				sPathValue.append(pathSeparator);
+			}
+
+			String command = "soffice.bin";
+			
+			env = SystemHelper.addEnv(env, "PATH", sPathValue.toString(), pathSeparator);
+			if (null != userInstallation) {
+				// We have to turn the path to a URI something like file:///foo/bar/.ooo-debug
+				//TODO find a better way to get the proper URI.
+				URI userInstallationURI = new URI("file", "", userInstallation.toFile().toURI().getPath(), null);
+				env = SystemHelper.addEnv(env, "UserInstallation", userInstallationURI.toString(), null);
+				command += " -nofirststartwiozard ";
+			}
+
+			PluginLogger.debug("Launching OpenOffice from commandline: " + command);
+			Process p = pPrj.getSdk().runToolWithEnv(prj, pPrj.getOOo(),
+					command, env, pMonitor);
+			DebugPlugin.newProcess(pLaunch, p, Messages
+					.getString("AbstractOOo.OpenOfficeProcessName")); //$NON-NLS-1$
+		} catch (Exception e) {
+			PluginLogger.error("Error running OpenOffice", e);
 		}
-		
-    	String command = "soffice.bin";
-//        	+
-//            " -c " + pMain + //$NON-NLS-1$
-//            " -l " + libpath +  //$NON-NLS-1$
-//            " -- " + pArgs; //$NON-NLS-1$
-    	
-    	Process p = pPrj.getSdk().runToolWithEnv(prj, pPrj.getOOo(), command, env, pMonitor);
-        DebugPlugin.newProcess(pLaunch, p, Messages.getString("AbstractOOo.OpenOfficeProcessName")); //$NON-NLS-1$    	
     }
     
     /**
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
index 258e889..ababe90 100755
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/UnoidlProject.java
@@ -470,6 +470,17 @@ public class UnoidlProject implements IUnoidlProject, IProjectNature {
     public IPath getUrdPath() {
         return getFolder(getBuildPath().append(UnoidlProjectHelper.URD_BASIS)).getProjectRelativePath();
     }
+    
+	public IPath getDistPath() {
+		return getFolder(getBuildPath().append(UnoidlProjectHelper.DIST_BASIS))
+				.getProjectRelativePath();
+	}
+	
+	public IPath getOpenOfficeUserProfilePath() {
+		return getFolder(
+				getDistPath().append(UnoidlProjectHelper.OO_PROFILE_BASIS))
+				.getProjectRelativePath();
+	}
 
     /**
      * {@inheritDoc}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
index ac9c276..3d1871a 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
@@ -4,12 +4,15 @@ import org.eclipse.osgi.util.NLS;
 
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.openoffice.ide.eclipse.core.launch.office.messages"; //$NON-NLS-1$
+	public static String OfficeLaunchDelegate_LaunchError;
+	public static String OfficeLaunchDelegate_LaunchErrorTitle;
 	public static String OfficeTab_Options;
 	public static String OfficeTab_Configurationerror;
 	public static String OfficeTab_ProjectNameLabel;
 	public static String OfficeTab_Title;
 	public static String OfficeTab_UnoProject;
 	public static String OfficeTab_ChkUseCleanUserInstallation;
+	public static String OfficeTab_ChkUseCleanUserInstallation_ToolTip;
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
index fbfaecb..2e42086 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
@@ -2,7 +2,9 @@ package org.openoffice.ide.eclipse.core.launch.office;
 
 import java.text.MessageFormat;
 
+import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.debug.core.ILaunch;
@@ -12,6 +14,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.widgets.Display;
 import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
 import org.openoffice.ide.eclipse.core.model.ProjectsManager;
+import org.openoffice.ide.eclipse.core.model.language.ILanguageBuilder;
 
 public class OfficeLaunchDelegate extends LaunchConfigurationDelegate {
 
@@ -39,23 +42,39 @@ public class OfficeLaunchDelegate extends LaunchConfigurationDelegate {
 
 			String prjName = pConfiguration.getAttribute(
 					IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
+			boolean useCleanUserInstalation = pConfiguration.getAttribute(
+					IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false);
+			
 			IUnoidlProject prj = ProjectsManager.getProject(prjName);
 
 			if (null != prj) {
 				try {
-					// ILanguageBuilder langBuilder = prj.getLanguage()
-					// .getLanguageBuidler();
-					// langBuilder.createLibrary(prj);
+					ILanguageBuilder langBuilder = prj.getLanguage()
+							.getLanguageBuidler();
+					langBuilder.createLibrary(prj);
 
 					// Run an OpenOffice instance
-					prj.getOOo().runOpenOffice(prj, pLaunch, null, pMonitor);
+					IPath userInstallation = null;
+					if (useCleanUserInstalation) {
+						IFolder userInstallationFolder = prj.getFolder(prj
+								.getOpenOfficeUserProfilePath());
+						//TODO find  better way to make sure the folder exists.
+						if (!userInstallationFolder.exists()) {
+							((IFolder)userInstallationFolder.getParent()).create(true, true, null);
+							userInstallationFolder.create(true, true, null);
+						}
+						userInstallation = userInstallationFolder.getLocation();
+					}
+							
+					prj.getOOo().runOpenOffice(prj, pLaunch, userInstallation,
+							pMonitor);
 				} catch (Exception e) {
 					Display.getDefault().asyncExec(new Runnable() {
 
 						public void run() {
 							MessageDialog.openError(Display.getDefault()
-									.getActiveShell(), "Error Title", //$NON-NLS-1$
-									"Error Message"); //$NON-NLS-1$    
+									.getActiveShell(), Messages.OfficeLaunchDelegate_LaunchErrorTitle, 
+									Messages.OfficeLaunchDelegate_LaunchError);     
 						}
 					});
 				}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
index ae5710e..2b96822 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
@@ -53,6 +53,7 @@ public class OfficeTab extends AbstractLaunchConfigurationTab {
 		useCleanUserInstallation
 				.setText(Messages.OfficeTab_ChkUseCleanUserInstallation);
 		useCleanUserInstallation.addSelectionListener(mListener);
+		useCleanUserInstallation.setToolTipText(Messages.OfficeTab_ChkUseCleanUserInstallation_ToolTip);
 	}
 
 	private void createProjectGroup(Composite parent) {
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties b/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties
index f558447..72e525b 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties
@@ -1,6 +1,11 @@
+OfficeLaunchDelegate_LaunchError=Error Message
+OfficeLaunchDelegate_LaunchErrorTitle=Error Title
 OfficeTab_Configurationerror=Configuration Error
 OfficeTab_ProjectNameLabel=Project
 OfficeTab_Title=OpenOffice
 OfficeTab_UnoProject=UNO Project
 OfficeTab_Options=Options
-OfficeTab_ChkUseCleanUserInstallation=Use Clean User Installation
\ No newline at end of file
+OfficeTab_ChkUseCleanUserInstallation=Use Clean User Installation
+OfficeTab_ChkUseCleanUserInstallation_ToolTip=Start OpenOffice with a temporary user profile so that we do not pollute the system installed user profile.
+OfficeLaunchDelegate_LaunchErrorTitle=Error Launching OpenOffice
+OfficeLaunchDelegate_LaunchError=There was an exception launching OpenOffice.Please see the Error Log.
\ No newline at end of file
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java b/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java
index 7572070..97615a0 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/IUnoidlProject.java
@@ -244,6 +244,20 @@ public interface IUnoidlProject {
      */
     public IPath getUrdPath();
     
+	/**
+	 * @return the path to the project's folder containing the distribution .oxf
+	 *         file.
+	 */
+	public IPath getDistPath();
+	
+	/**
+	 * @return the path to the project's folder used to store the user profile
+	 *         when running/debugging OpenOffice in a clean environment. This
+	 *         way we do not mangle with the system wide installed, OpenOffice
+	 *         settings.
+	 */
+	public IPath getOpenOfficeUserProfilePath();
+    
     //----------------------------------------------- Project resources getters
     
     /**
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java b/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
index 5ff7004..a9db057 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
@@ -164,6 +164,13 @@ public interface IOOo {
     public void runUno(IUnoidlProject pPrj, String pMain, String pArgs, 
             ILaunch pLaunch, IProgressMonitor pMonitor);
     
+    /**
+     * 
+     * @param pPrj the project to run
+     * @param pLaunch the launcher to which we'll add our processes
+     * @param userInstallation the userInstallation folder to use. If null we'll go with the default system one.
+     * @param pMonitor a monitor to follow the progress
+     */
     public void runOpenOffice(IUnoidlProject pPrj,  
             ILaunch pLaunch, IPath userInstallation, IProgressMonitor pMonitor);
     
commit d622c0ed05c86b67f6f7e2fc1f90b34f155a6fd4
Author: cdan <cdan at savatech.ro>
Date:   Mon Jun 14 17:33:03 2010 +0300

    First attempt of implementing an OpenOffice launch type.

diff --git a/core/plugin.xml b/core/plugin.xml
index 4491ae0..f78f49a 100755
--- a/core/plugin.xml
+++ b/core/plugin.xml
@@ -263,6 +263,12 @@
             id="org.openoffice.ide.eclipse.core.launchUreApplication"
             modes="run"
             name="URE Application"/>
+      <launchConfigurationType
+            delegate="org.openoffice.ide.eclipse.core.launch.office.OfficeLaunchDelegate"
+            id="org.openoffice.ide.eclipse.core.launchOpenOffice"
+            modes="run"
+            name="Open Office Application">
+      </launchConfigurationType>
    </extension>
    <extension
          point="org.eclipse.debug.ui.launchConfigurationTabGroups">
@@ -270,6 +276,11 @@
             class="org.openoffice.ide.eclipse.core.launch.LaunchConfigurationTabs"
             id="org.openoffice.ide.eclipse.core.launchConfigurationTabGroup1"
             type="org.openoffice.ide.eclipse.core.launchUreApplication"/>
+      <launchConfigurationTabGroup
+            class="org.openoffice.ide.eclipse.core.launch.office.LaunchConfigurationTabs"
+            id="org.openoffice.ide.eclipse.core.OfficeLlaunchConfigurationTabGroup1"
+            type="org.openoffice.ide.eclipse.core.launchOpenOffice">
+      </launchConfigurationTabGroup>
    </extension>
    <extension
          point="org.eclipse.debug.ui.launchConfigurationTypeImages">
@@ -277,6 +288,11 @@
             configTypeID="org.openoffice.ide.eclipse.core.launchUreApplication"
             icon="icons/ure_app.gif"
             id="org.openoffice.ide.eclipse.core.UreLaunchIcon"/>
+      <launchConfigurationTypeImage
+            configTypeID="org.openoffice.ide.eclipse.core.launchOpenOffice"
+            icon="icons/ooo16.png"
+            id="org.openoffice.ide.eclipse.core.OfficeLaunchIcon">
+      </launchConfigurationTypeImage>
    </extension>
    <extension
          point="org.eclipse.ui.exportWizards">
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
index 2c13d96..529551d 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
@@ -50,6 +50,7 @@ import java.io.StringWriter;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
@@ -361,6 +362,34 @@ public abstract class AbstractOOo implements IOOo, ITableElement {
         DebugPlugin.newProcess(pLaunch, p, Messages.getString("AbstractOOo.UreProcessName")  + pMain); //$NON-NLS-1$
     }
     
+    public void runOpenOffice(IUnoidlProject pPrj, 
+    		ILaunch pLaunch, IPath userInstallation, IProgressMonitor pMonitor) {
+    	IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject( pPrj.getName() );
+    	String[] env = pPrj.getLanguage().getLanguageBuidler().getBuildEnv(pPrj);
+    	
+    	String pathSeparator = System.getProperty("path.separator");
+    	String[] sPaths = pPrj.getOOo().getBinPath();
+    	StringBuilder sPathValue = new StringBuilder();
+		for (String sPath : sPaths) {
+    		sPathValue.append(sPath);
+    		sPathValue.append(pathSeparator);
+    	}
+    	
+		env = SystemHelper.addEnv(env, "PATH", sPathValue.toString(), pathSeparator);
+		if(null != userInstallation) {
+			env = SystemHelper.addEnv(env, "UserInstallation", userInstallation.toOSString(), null);
+		}
+		
+    	String command = "soffice.bin";
+//        	+
+//            " -c " + pMain + //$NON-NLS-1$
+//            " -l " + libpath +  //$NON-NLS-1$
+//            " -- " + pArgs; //$NON-NLS-1$
+    	
+    	Process p = pPrj.getSdk().runToolWithEnv(prj, pPrj.getOOo(), command, env, pMonitor);
+        DebugPlugin.newProcess(pLaunch, p, Messages.getString("AbstractOOo.OpenOfficeProcessName")); //$NON-NLS-1$    	
+    }
+    
     /**
      * Sets the target platform for tests.
      * 
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/messages.properties b/core/source/org/openoffice/ide/eclipse/core/internal/model/messages.properties
index 429b92d..5d99548 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/messages.properties
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/messages.properties
@@ -1,5 +1,6 @@
 AbstractOOo.NoDirectoryError=Not an existing directory: 
-AbstractOOo.UreProcessName=URE process : 
+AbstractOOo.UreProcessName=URE process :
+AbstractOOo.OpenOfficeProcessName=OpenOffice 
 AbstractOOo.NoFileError=Not an existing file: 
 UnoidlProject.RemoveMarkerError=Failed to remove marker
 UnoidlProject.NoOOoSdkError=No SDK or OOo set: won't build
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java
new file mode 100644
index 0000000..153c548
--- /dev/null
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/IOfficeLaunchConstants.java
@@ -0,0 +1,8 @@
+package org.openoffice.ide.eclipse.core.launch.office;
+
+public interface IOfficeLaunchConstants {
+
+	String PROJECT_NAME = "project_name";
+	String CLEAN_USER_INSTALLATION = "useCleanUserInstallation";
+
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java
new file mode 100644
index 0000000..c6789b2
--- /dev/null
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/LaunchConfigurationTabs.java
@@ -0,0 +1,22 @@
+package org.openoffice.ide.eclipse.core.launch.office;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+
+public class LaunchConfigurationTabs extends
+		AbstractLaunchConfigurationTabGroup {
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public void createTabs(ILaunchConfigurationDialog pDialog, String pMode) {
+		ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+				new OfficeTab(), new CommonTab() };
+
+		setTabs(tabs);
+
+	}
+
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
new file mode 100644
index 0000000..ac9c276
--- /dev/null
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/Messages.java
@@ -0,0 +1,20 @@
+package org.openoffice.ide.eclipse.core.launch.office;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+	private static final String BUNDLE_NAME = "org.openoffice.ide.eclipse.core.launch.office.messages"; //$NON-NLS-1$
+	public static String OfficeTab_Options;
+	public static String OfficeTab_Configurationerror;
+	public static String OfficeTab_ProjectNameLabel;
+	public static String OfficeTab_Title;
+	public static String OfficeTab_UnoProject;
+	public static String OfficeTab_ChkUseCleanUserInstallation;
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+	}
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
new file mode 100644
index 0000000..fbfaecb
--- /dev/null
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
@@ -0,0 +1,68 @@
+package org.openoffice.ide.eclipse.core.launch.office;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
+import org.openoffice.ide.eclipse.core.model.ProjectsManager;
+
+public class OfficeLaunchDelegate extends LaunchConfigurationDelegate {
+
+	/**
+	 * Export the .oxt file, deploy it in openoffice, run openoffice.
+	 */
+	private static final int TASK_UNITS = 3;
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public void launch(ILaunchConfiguration pConfiguration, String pMode,
+			ILaunch pLaunch, IProgressMonitor pMonitor) throws CoreException {
+		if (pMonitor == null) {
+			pMonitor = new NullProgressMonitor();
+		}
+
+		try {
+			pMonitor.beginTask(MessageFormat.format("{0}...", //$NON-NLS-1$
+					new Object[] { pConfiguration.getName() }), TASK_UNITS);
+			// check for cancellation
+			if (pMonitor.isCanceled()) {
+				return;
+			}
+
+			String prjName = pConfiguration.getAttribute(
+					IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
+			IUnoidlProject prj = ProjectsManager.getProject(prjName);
+
+			if (null != prj) {
+				try {
+					// ILanguageBuilder langBuilder = prj.getLanguage()
+					// .getLanguageBuidler();
+					// langBuilder.createLibrary(prj);
+
+					// Run an OpenOffice instance
+					prj.getOOo().runOpenOffice(prj, pLaunch, null, pMonitor);
+				} catch (Exception e) {
+					Display.getDefault().asyncExec(new Runnable() {
+
+						public void run() {
+							MessageDialog.openError(Display.getDefault()
+									.getActiveShell(), "Error Title", //$NON-NLS-1$
+									"Error Message"); //$NON-NLS-1$    
+						}
+					});
+				}
+			}
+		} finally {
+			pMonitor.done();
+		}
+	}
+
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
new file mode 100644
index 0000000..ae5710e
--- /dev/null
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeTab.java
@@ -0,0 +1,156 @@
+package org.openoffice.ide.eclipse.core.launch.office;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.openoffice.ide.eclipse.core.PluginLogger;
+import org.openoffice.ide.eclipse.core.gui.UnoProjectLabelProvider;
+import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
+import org.openoffice.ide.eclipse.core.model.ProjectsManager;
+
+public class OfficeTab extends AbstractLaunchConfigurationTab {
+
+	private static final int LAYOUT_COLUMNS = 3;
+	private Text mProjectTxt;
+	private Button mProjectBtn;
+	private Button useCleanUserInstallation;
+	private SelectionListener mListener = new ChangeListener();
+
+	public void createControl(Composite pParent) {
+		Composite comp = new Composite(pParent, SWT.NONE);
+		comp.setLayoutData(new GridData(GridData.FILL_BOTH));
+		comp.setLayout(new GridLayout());
+
+		createProjectGroup(comp);
+
+		createOptionsGroup(comp);
+
+		setControl(comp);
+	}
+
+	private void createOptionsGroup(Composite parent) {
+		Group group = new Group(parent, SWT.NONE);
+		group.setText(Messages.OfficeTab_Options);
+		group.setLayout(new GridLayout());
+		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+		useCleanUserInstallation = new Button(group, SWT.CHECK);
+		useCleanUserInstallation
+				.setText(Messages.OfficeTab_ChkUseCleanUserInstallation);
+		useCleanUserInstallation.addSelectionListener(mListener);
+	}
+
+	private void createProjectGroup(Composite parent) {
+		Group group = new Group(parent, SWT.NONE);
+		group.setText(Messages.OfficeTab_UnoProject);
+		group.setLayout(new GridLayout());
+		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+		Composite field = new Composite(group, SWT.NONE);
+		field.setLayout(new GridLayout(LAYOUT_COLUMNS, false));
+		field.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+		Label lbl = new Label(field, SWT.NONE);
+		lbl.setText(Messages.OfficeTab_ProjectNameLabel);
+		lbl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
+
+		mProjectTxt = new Text(field, SWT.SINGLE | SWT.BORDER);
+		mProjectTxt.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
+				| GridData.GRAB_HORIZONTAL));
+		// mProjectTxt.addModifyListener(mListener);
+
+		mProjectBtn = new Button(field, SWT.PUSH);
+		mProjectBtn.setText("...");
+		mProjectBtn.addSelectionListener(mListener);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public String getName() {
+		return Messages.OfficeTab_Title;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public void initializeFrom(ILaunchConfiguration pConfiguration) {
+		try {
+			mProjectTxt.setText(pConfiguration.getAttribute(
+					IOfficeLaunchConstants.PROJECT_NAME, ""));
+			useCleanUserInstallation.setSelection(pConfiguration.getAttribute(
+					IOfficeLaunchConstants.CLEAN_USER_INSTALLATION, false));
+		} catch (CoreException e) {
+			PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
+		}
+	}
+
+	public void performApply(ILaunchConfigurationWorkingCopy pConfiguration) {
+		pConfiguration.setAttribute(IOfficeLaunchConstants.PROJECT_NAME,
+				mProjectTxt.getText().trim());
+		pConfiguration.setAttribute(
+				IOfficeLaunchConstants.CLEAN_USER_INSTALLATION,
+				useCleanUserInstallation.getSelection());
+	}
+
+	public void setDefaults(ILaunchConfigurationWorkingCopy pConfiguration) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public boolean isValid(ILaunchConfiguration pLaunchConfig) {
+		boolean valid = false;
+
+		try {
+
+			boolean projectSet = !pLaunchConfig.getAttribute(
+					IOfficeLaunchConstants.PROJECT_NAME, "").equals("");//$NON-NLS-1$ //$NON-NLS-2$
+			if (projectSet) {
+				String name = pLaunchConfig.getAttribute(
+						IOfficeLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
+				valid = ProjectsManager.getProject(name) != null;
+			}
+		} catch (CoreException e) {
+			PluginLogger.error(Messages.OfficeTab_Configurationerror, e);
+		}
+
+		return valid;
+	}
+
+	private class ChangeListener extends SelectionAdapter {
+		public void widgetSelected(SelectionEvent event) {
+			if (event.getSource().equals(mProjectBtn)) {
+				ILabelProvider labelProvider = new UnoProjectLabelProvider();
+				ElementListSelectionDialog dialog = new ElementListSelectionDialog(
+						getShell(), labelProvider);
+				dialog.setTitle("ProjectChooserTitle"); //$NON-NLS-1$
+				dialog.setMessage("ProjectChooserMessage"); //$NON-NLS-1$
+				dialog.setElements(ProjectsManager.getProjects());
+
+				if (dialog.open() == Window.OK) {
+					IUnoidlProject mProject = (IUnoidlProject) dialog
+							.getFirstResult();
+					mProjectTxt.setText(mProject.getName());
+				}
+			}
+			setDirty(true);
+			getLaunchConfigurationDialog().updateButtons();
+		}
+	}
+}
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties b/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties
new file mode 100644
index 0000000..f558447
--- /dev/null
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/messages.properties
@@ -0,0 +1,6 @@
+OfficeTab_Configurationerror=Configuration Error
+OfficeTab_ProjectNameLabel=Project
+OfficeTab_Title=OpenOffice
+OfficeTab_UnoProject=UNO Project
+OfficeTab_Options=Options
+OfficeTab_ChkUseCleanUserInstallation=Use Clean User Installation
\ No newline at end of file
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java b/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
index 3c0385d..5ff7004 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java
@@ -45,6 +45,7 @@ package org.openoffice.ide.eclipse.core.model.config;
 
 import java.io.File;
 
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.debug.core.ILaunch;
 import org.openoffice.ide.eclipse.core.model.IUnoidlProject;
@@ -163,6 +164,9 @@ public interface IOOo {
     public void runUno(IUnoidlProject pPrj, String pMain, String pArgs, 
             ILaunch pLaunch, IProgressMonitor pMonitor);
     
+    public void runOpenOffice(IUnoidlProject pPrj,  
+            ILaunch pLaunch, IPath userInstallation, IProgressMonitor pMonitor);
+    
     /**
      * @return <code>true</code> if the OOo instance has a package manager.
      */


More information about the ooo-build-commit mailing list