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

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Mon Oct 5 04:30:15 PDT 2009


 core/source/org/openoffice/ide/eclipse/core/builders/RegmergeBuilder.java |    2 
 core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java       |   46 +++++++---
 core/source/org/openoffice/ide/eclipse/core/internal/model/URE.java       |    8 +
 core/source/org/openoffice/ide/eclipse/core/model/config/IOOo.java        |    8 +
 4 files changed, 50 insertions(+), 14 deletions(-)

New commits:
commit 08232060ffe30656f6e8484374af9ff54be1b6cb
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Mon Oct 5 13:31:30 2009 +0200

    Really fixed the move of regmerge out of the SDK
    
    Cherry-picked from ooeclipse-1-1-2 branch

diff --git a/core/source/org/openoffice/ide/eclipse/core/builders/RegmergeBuilder.java b/core/source/org/openoffice/ide/eclipse/core/builders/RegmergeBuilder.java
index 61c95c9..2e37566 100755
--- a/core/source/org/openoffice/ide/eclipse/core/builders/RegmergeBuilder.java
+++ b/core/source/org/openoffice/ide/eclipse/core/builders/RegmergeBuilder.java
@@ -124,7 +124,7 @@ public class RegmergeBuilder {
                            existingReg + "\"" + pFile.getAbsolutePath() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
         
         // Process creation. Need to set the PATH value using OOo path: due to some tools changes in 3.1
-        String[] sPaths = pUnoprj.getOOo().getLibsPath();
+        String[] sPaths = pUnoprj.getOOo().getBinPath();
         String sPathValue = "PATH="; //$NON-NLS-1$
         for (String sPath : sPaths) {
             if ( !sPathValue.endsWith("=")) { //$NON-NLS-1$
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 c379436..82897fc 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
@@ -167,6 +167,21 @@ public class OOo extends AbstractOOo {
     /**
      * {@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);
+    }
+    
+    /**
+     * {@inheritDoc}
+     */
     public String[] getTypesPath() {
         String[] paths = {
             getLibsPath()[0] + FILE_SEP + "types.rdb" //$NON-NLS-1$ 
@@ -511,7 +526,7 @@ public class OOo extends AbstractOOo {
         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.
@@ -563,6 +578,23 @@ public class OOo extends AbstractOOo {
         }
         
         /**
+         * @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});
+            }
+            
+            return additionnal;
+        }
+        
+        /**
          * @return the OOo 3.0 classes path or an empty array if not an OOo3 install.
          */
         public String[] getClasses() {
@@ -627,18 +659,6 @@ public class OOo extends AbstractOOo {
         }
         
         /**
-         * @return the javaldx path for OOo3 or <code>null</code> if not an OOo3 install.
-         */
-        public String getJavaldx() {
-            String path = null;
-            if (isVersion3()) {
-                path = mUre.getJavaldxPath();
-            }
-            
-            return path;
-        }
-        
-        /**
          * Merge two string arrays into one.
          * 
          * The duplicated elements are not removed.
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 aada277..fb8db68 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
@@ -116,6 +116,14 @@ public class URE extends AbstractOOo {
         }
         return new String[]{ libs };
     }
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String[] getBinPath() {
+        String libs = getHome() + FILE_SEP + "bin"; //$NON-NLS-1$
+        return new String[]{ libs };
+    }
 
     /**
      * {@inheritDoc}
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 87867f7..3c0385d 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
@@ -103,6 +103,14 @@ public interface IOOo {
     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>
+     * 
+     * @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.
      */


More information about the ooo-build-commit mailing list