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

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Fri Sep 25 12:33:55 PDT 2009


 .gitignore                                                              |    3 
 build/README                                                            |    2 
 build/build.xml                                                         |    9 
 core/META-INF/MANIFEST.MF                                               |    2 
 core/plugin.properties                                                  |   13 
 core/plugin.xml                                                         |   20 -
 cpp/build/MANIFEST.MF.in                                                |   18 +
 cpp/build/build.properties                                              |    3 
 cpp/build/build.xml                                                     |  133 ++++++++++
 cpp/build/feature.xml.in                                                |   57 ++++
 cpp/build/site_fragment.xml.in                                          |    7 
 cpp/source/org/openoffice/ide/eclipse/cpp/CDTHelper.java                |   34 ++
 cpp/source/org/openoffice/ide/eclipse/cpp/CppBuilder.java               |    4 
 cpp/source/org/openoffice/ide/eclipse/cpp/CppProjectHandler.java        |    4 
 cpp/source/org/openoffice/ide/eclipse/cpp/Messages.java                 |   22 +
 cpp/source/org/openoffice/ide/eclipse/cpp/OOoSdkProjectJob.java         |   12 
 cpp/source/org/openoffice/ide/eclipse/cpp/client/ClientWizard.java      |   10 
 cpp/source/org/openoffice/ide/eclipse/cpp/client/Messages.java          |   22 +
 cpp/source/org/openoffice/ide/eclipse/cpp/client/UnoConnectionPage.java |    6 
 cpp/source/org/openoffice/ide/eclipse/cpp/client/messages.properties    |    7 
 cpp/source/org/openoffice/ide/eclipse/cpp/messages.properties           |   11 
 21 files changed, 362 insertions(+), 37 deletions(-)

New commits:
commit f553576dcc9a3fa73aefd7a44582001ff21c6426
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Sep 25 21:32:18 2009 +0200

    Started to prepare C++ plugin for release
    
     * Added the build scripts
     * Externalized the strings

diff --git a/.gitignore b/.gitignore
index a8047ed..beeb0f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
 /*/bin
+/site
+/*.zip
+/core/doc/help/html/api/
diff --git a/build/README b/build/README
index c5a219f..3679988 100644
--- a/build/README
+++ b/build/README
@@ -2,7 +2,7 @@ Building OOoEclipse Integration
 
 in order to build OOoEclipseIntegration to produce an update site,
 you need to have installed OpenOffice.org and Eclipse.You may install
-only the necesary jars, but you'll have to hack the ant build.xml
+only the necessary jars, but you'll have to hack the ant build.xml
 files.
 
 Define the ANT_ARGS variable to the following:
diff --git a/build/build.xml b/build/build.xml
index c2f556c..fd53b36 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -44,6 +44,7 @@
 
 	<import file="../core/build/build.xml"/>
 	<import file="../java/build/build.xml"/>
+	<import file="../cpp/build/build.xml"/>
 	
 	<target name="help" description="Tells how to run the script">
 		<echo>
@@ -99,7 +100,7 @@
     </target>
 	
 	<target name="init-env" 
-		depends="init-env-ooo2, init-env-ooo3, core.init-env, java.init-env">
+		depends="init-env-ooo2, init-env-ooo3, core.init-env, java.init-env, cpp.init-env">
 		<property name="package.prefix" value="org.openoffice.ide.eclipse"/>
 		
 		<property name="out.path" value="site" />
@@ -115,17 +116,17 @@
 	</target>
 
 	<target name="clean" description="Cleans the temporary output results" 
-		depends="init-env, core.clean, java.clean">
+		depends="init-env, core.clean, java.clean, cpp.clean">
 		<delete dir="${out.path}" />
 	</target>
 	
 	<target name="purge" description="Cleans all the output results" 
-		depends="clean, core.purge, java.purge">
+		depends="clean, core.purge, java.purge, cpp.purge">
 		<delete file="ooeclipseintegration_site.zip" />
 	</target>
 	
 	
-	<target name="site" depends="init-env, core.site, java.site"
+	<target name="site" depends="init-env, core.site, java.site, cpp.site"
 		description="Creates the Eclipse update site">
 		
 		<!-- Copying the features and plugins -->
diff --git a/core/META-INF/MANIFEST.MF b/core/META-INF/MANIFEST.MF
index d772558..7e8aeb2 100755
--- a/core/META-INF/MANIFEST.MF
+++ b/core/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: OOo eclipse integration
+Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.openoffice.ide.eclipse.core; singleton:=true
 Bundle-Version: 1.1.0
 Bundle-Activator: org.openoffice.ide.eclipse.core.OOEclipsePlugin
diff --git a/core/plugin.properties b/core/plugin.properties
index 1ce5675..8d925cd 100755
--- a/core/plugin.properties
+++ b/core/plugin.properties
@@ -33,4 +33,15 @@ cheatsheets.starting.description = This tutorial will guide you trough the diffe
                                    
 project.propertypage.name        = UNO properties
 
-contenttype.name                 = UNO-IDL content type
\ No newline at end of file
+contenttype.name                 = UNO-IDL content type
+Bundle-Name = OOo eclipse integration
+editor.name = Extension properties editor
+wizard.file.description = Create a new UNO specification file. Please use this wizard with care: you should better run the type-specific wizards if they exists.
+wizard.component.description = Create an empty UNO component with a service and it's implementation.
+wizard.service.description = Creates a new 'new-styled' UNO service. A service will export one interface and define some constructors.
+wizard.interface.description = Create an new UNO interface. An interface is a set of related methods and properties that will be used by a service.
+wizard.ure.name = New URE based Application
+wizard.ure.description = Create an URE based application. This wizard will create the basic skeleton to run an application featuring UNO component model.
+nature.name = UNO Nature
+action.service.label = New Uno Service
+action.service.tooltip = Create a UNO Service
\ No newline at end of file
diff --git a/core/plugin.xml b/core/plugin.xml
index 6f32160..5749017 100755
--- a/core/plugin.xml
+++ b/core/plugin.xml
@@ -25,7 +25,7 @@
             filenames="package.properties,description.xml"
             icon="icons/build_exec.gif"
             id="org.openoffice.ide.eclipse.core.editors.extproperties"
-            name="Extension properties editor"/>
+            name="%editor.name"/>
    </extension>
    
    <extension
@@ -62,7 +62,7 @@
             name="%wizards.unoidlfile"
             project="false">
          <description>
-            Create a new UNO specification file. Please use this wizard with care: you should better run the type-specific wizards if they exists.
+            %wizard.file.description
          </description>
       </wizard>
       <wizard
@@ -77,7 +77,7 @@
          	<parameter name="unoproject" value="true"/>
          </class>
          <description>
-            Create an empty UNO component with a service and it's implementation.
+            %wizard.component.description
          </description>
       </wizard>
       <wizard
@@ -92,7 +92,7 @@
          	<parameter name="unotype" value="true"/>
          </class>
          <description>
-            Creates a new 'new-styled' UNO service. A service will export one interface and define some constructors.
+            %wizard.service.description
          </description>
       </wizard>
       <wizard
@@ -107,7 +107,7 @@
          	<parameter name="unotype" value="true"/>
          </class>
          <description>
-            Create an new UNO interface. An interface is a set of related methods and properties that will be used by a service.
+            %wizard.interface.description
          </description>
       </wizard>
       <wizard
@@ -116,19 +116,19 @@
             hasPages="true"
             icon="icons/new_ure_app.gif"
             id="org.openoffice.ide.eclipse.core.newureapp"
-            name="New URE based Application"
+            name="%wizard.ure.name"
             project="true">
          <class class="org.openoffice.ide.eclipse.core.wizards.NewUreAppWizard">
          	<parameter name="unoproject" value="true"/>
          </class>
          <description>
-            Create an URE based application. This wizard will create the basic skeleton to run an application featuring UNO component model.
+            %wizard.ure.description
          </description>
       </wizard>
    </extension>
    <extension
          id="unonature"
-         name="UNO Nature"
+         name="%nature.name"
          point="org.eclipse.core.resources.natures">
       <runtime>
          <run class="org.openoffice.ide.eclipse.core.internal.model.UnoidlProject"/>
@@ -154,10 +154,10 @@
                class="org.openoffice.ide.eclipse.core.actions.UnoTypePulldownAction"
                icon="icons/newservice.gif"
                id="org.openoffice.ide.eclipse.core.newactions.newtype"
-               label="New Uno Service"
+               label="%action.service.label"
                style="pulldown"
                toolbarPath="uno"
-               tooltip="Create a UNO Service"/>
+               tooltip="%action.service.tooltip"/>
          <!--
          <action
                class="org.openoffice.ide.eclipse.core.actions.NewUnoFileAction"
diff --git a/cpp/build/MANIFEST.MF.in b/cpp/build/MANIFEST.MF.in
new file mode 100644
index 0000000..c219353
--- /dev/null
+++ b/cpp/build/MANIFEST.MF.in
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: C++ extensions support for OOo
+Bundle-SymbolicName: org.openoffice.ide.eclipse.cpp;singleton:=true
+Bundle-Version: 0.0.1
+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",
+ org.eclipse.core.resources;bundle-version="3.4.1",
+ org.eclipse.cdt.core;bundle-version="5.0.1",
+ 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"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
diff --git a/cpp/build/build.properties b/cpp/build/build.properties
new file mode 100644
index 0000000..444ad1c
--- /dev/null
+++ b/cpp/build/build.properties
@@ -0,0 +1,3 @@
+#Wed Apr 26 20:26:48 CEST 2006
+cpp.plugin.version=0.5
+debug=true
\ No newline at end of file
diff --git a/cpp/build/build.xml b/cpp/build/build.xml
new file mode 100644
index 0000000..d9ff26b
--- /dev/null
+++ b/cpp/build/build.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<!-- ====================================================================== 
+ * $RCSfile: build.xml,v $
+ *
+ * $Revision: 1.8 $
+ *
+ * last change: $Author: cedricbosdo $ $Date: 2008/12/13 13:43:02 $
+ *
+ * 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                                                              
+ ====================================================================== -->
+
+<project name="cpp" default="cpp.error">
+
+	
+	<target name="cpp.error">
+		<fail>Wrong target!
+			
+			This script should not be executed directly.
+			Please, use the one in the build project
+		</fail>
+	</target>
+	
+	
+	<target name="init-env">
+		<dirname property="cpp.basedir" file="${ant.file.cpp}/.."/>
+		
+		<loadproperties srcfile="${cpp.basedir}/build/build.properties" />
+		
+		<property name="cpp.out.path" value="${cpp.basedir}/bin/ant" />
+		<property name="cpp.out.classes" value="${cpp.out.path}/classes"/>
+		<property name="cpp.sources" value="${cpp.basedir}/source"/>
+		
+		<path id="cpp.dependencies.path">
+			<pathelement location="${core.out.classes}"/>
+			
+			<fileset dir="${eclipse.home}/plugins/">
+				<include name="org.eclipse*.jar"/>
+			</fileset>
+		</path>
+		
+		<mkdir dir="${cpp.out.path}/features" />
+		<mkdir dir="${cpp.out.path}/plugins" />
+		<mkdir dir="${cpp.out.classes}" />
+	</target>
+	
+	<target name="clean">
+		<delete dir="${cpp.out.classes}" />
+	</target>
+	
+	<target name="purge" depends="clean">
+		<delete dir="${cpp.out.path}" />
+	</target>
+
+	<target name="site" depends="cpp.plugin, cpp.feature">
+		<copy file="${cpp.basedir}/build/site_fragment.xml.in" 
+			tofile="${cpp.out.path}/site_fragment.xml" />
+		<replace file="${cpp.out.path}/site_fragment.xml"
+			token="@VERSION@" value="${cpp.plugin.version}" />
+	</target>
+
+	<target name="cpp.feature">
+		<!-- Replace the @VERSION@ tokens to create the feature.xml file  -->
+		<copy file="${cpp.basedir}/build/feature.xml.in"
+			tofile="${cpp.out.path}/feature.xml" />
+		<replace file="${cpp.out.path}/feature.xml" 
+			token="@VERSION@" value="${cpp.plugin.version}" />
+		<replace file="${cpp.out.path}/feature.xml" 
+			token="@CORE_VERSION@" value="${core.plugin.version}" />
+		
+		<jar destfile="${cpp.out.path}/features/${package.prefix}.cpp_${cpp.plugin.version}.jar">
+			<zipfileset prefix="" file="${cpp.out.path}/feature.xml"/>
+		</jar>
+	</target>
+
+	<target name="cpp.compile" depends="init-env">
+		<javac srcdir="${cpp.sources}" destdir="${cpp.out.classes}"
+			target="1.5" source="1.5" 
+			debug="${debug}"
+			classpathref="cpp.dependencies.path" 
+			excludes="**/unittests/**"/>
+	</target>
+	
+	<target name="cpp.plugin" depends="cpp.compile">
+		<copy file="${cpp.basedir}/build/MANIFEST.MF.in"
+			tofile="${cpp.out.path}/MANIFEST.MF" />
+		<replace file="${cpp.out.path}/MANIFEST.MF"
+			token="@VERSION@" value="${cpp.plugin.version}" />
+		
+		<jar destfile="${cpp.out.path}/plugins/${package.prefix}.cpp_${cpp.plugin.version}.jar"
+			manifest="${cpp.out.path}/MANIFEST.MF">
+			<zipfileset prefix="" dir="${cpp.sources}">
+				<exclude name="**/*.java"/>
+			</zipfileset>
+			<zipfileset prefix="" dir="${cpp.out.classes}"/>
+			
+			<zipfileset prefix="icons" dir="${cpp.basedir}/icons"/>
+			<zipfileset prefix="" file="${cpp.basedir}/plugin.xml" />
+		</jar>
+	</target>
+	
+</project>
+
diff --git a/cpp/build/feature.xml.in b/cpp/build/feature.xml.in
new file mode 100644
index 0000000..ace5a83
--- /dev/null
+++ b/cpp/build/feature.xml.in
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.openoffice.ide.eclipse.cpp"
+      label="OpenOffice.org development plugin support for C++ implementation"
+      version="@VERSION@"
+      provider-name="Cédric Bosdonnat">
+
+   <description>
+This plugin provides the support of C++ implementation for OpenOffice.org
+component development. This plugin depends on the OpenOffice.org development
+core plugin.
+
+Even if this is a important piece of work, there are still other
+features to add and bugs to correct, please do not hesitate to
+express your remarks and requests on the ooo-build at lists.freedesktop.org 
+mailing list.
+   </description>
+
+   <copyright>
+      Copyright 2009 by Novell, Inc.
+All Rights Reserved.
+Contributor(s): Cedric Bosdonnat
+   </copyright>
+
+   <license url="http://www.openoffice.org/license.html">
+      GNU Lesser General Public License Version 2.1
+=============================================
+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
+   </license>
+
+   <url>
+      <discovery label="OpenOffice.org Plugin update site" url="http://cedric.bosdonnat.free.fr/ooeclipseintegration"/>
+   </url>
+
+   <requires>
+      <import feature="org.openoffice.ide.eclipse.core" version="@CORE_VERSION@"/>
+   </requires>
+
+   <plugin
+         id="org.openoffice.ide.eclipse.cpp"
+         download-size="0"
+         install-size="0"
+         version="@VERSION@"
+         unpack="false"/>
+
+</feature>
diff --git a/cpp/build/site_fragment.xml.in b/cpp/build/site_fragment.xml.in
new file mode 100644
index 0000000..d0e427f
--- /dev/null
+++ b/cpp/build/site_fragment.xml.in
@@ -0,0 +1,7 @@
+   <feature 
+   		url="features/org.openoffice.ide.eclipse.cpp_ at VERSION@.jar" 
+   		id="org.openoffice.ide.eclipse.cpp" version="@VERSION@">
+      <category name="OpenOffice.org"/>
+   </feature>
+   
+   
\ No newline at end of file
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/CDTHelper.java b/cpp/source/org/openoffice/ide/eclipse/cpp/CDTHelper.java
index 2b08d40..4f2933d 100644
--- a/cpp/source/org/openoffice/ide/eclipse/cpp/CDTHelper.java
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/CDTHelper.java
@@ -1,3 +1,33 @@
+/*************************************************************************
+ *
+ * The Contents of this file are made available subject to the terms of
+ * the GNU Lesser General Public License Version 2.1
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2009 by Novell, Inc.
+ *
+ * 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: Cédric Bosdonnat.
+ *
+ * Copyright: 2009 by Novell, Inc.
+ *
+ * All Rights Reserved.
+ * 
+ ************************************************************************/
 package org.openoffice.ide.eclipse.cpp;
 
 import java.util.ArrayList;
@@ -76,7 +106,7 @@ public class CDTHelper {
         try {
             CoreModel.getDefault().setProjectDescription( pProject, prjDesc );
         } catch ( CoreException e ) {
-            PluginLogger.error( "Error setting a path entry", e );
+            PluginLogger.error( Messages.getString("CDTHelper.PathEntryError"), e ); //$NON-NLS-1$
         }
     }
     
@@ -112,7 +142,7 @@ public class CDTHelper {
                         ManagedBuildManager.setOption(config, tool, option, newLibs.toArray( new String[ newLibs.size() ] ) );
                     }
                 } catch ( Exception e ) {
-                    PluginLogger.error( "Error setting linker libraries option", e );
+                    PluginLogger.error( Messages.getString("CDTHelper.LinkerOptionsError"), e ); //$NON-NLS-1$
                 }
             }
         }
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/CppBuilder.java b/cpp/source/org/openoffice/ide/eclipse/cpp/CppBuilder.java
index 10a8545..2cda4b4 100644
--- a/cpp/source/org/openoffice/ide/eclipse/cpp/CppBuilder.java
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/CppBuilder.java
@@ -125,10 +125,10 @@ public class CppBuilder implements ILanguageBuilder {
                 }
             } catch (InterruptedException e) {
                 PluginLogger.error(
-                        "cppumaker code generation failed", e);
+                        Messages.getString("CppBuilder.CppumakerError"), e); //$NON-NLS-1$
             } catch (IOException e) {
                 PluginLogger.warning(
-                        "Unreadable output error");
+                        Messages.getString("CppBuilder.ErrorOutputUnreadable")); //$NON-NLS-1$
             }
         }
     }
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/CppProjectHandler.java b/cpp/source/org/openoffice/ide/eclipse/cpp/CppProjectHandler.java
index 3a0d751..ae6c52f 100644
--- a/cpp/source/org/openoffice/ide/eclipse/cpp/CppProjectHandler.java
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/CppProjectHandler.java
@@ -90,9 +90,9 @@ public class CppProjectHandler implements IProjectHandler {
     public void addProjectNature(IProject pProject) {
         try {
             CDTHelper.addCDTNature( pProject, null );
-            PluginLogger.debug( "C++ project nature set" );
+            PluginLogger.debug( Messages.getString("CppProjectHandler.NatureSet") ); //$NON-NLS-1$
         } catch (CoreException e) {
-            PluginLogger.error( "Failed to set C++ project nature" );
+            PluginLogger.error( Messages.getString("CppProjectHandler.NatureFailed") ); //$NON-NLS-1$
         }
     }
 
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/Messages.java b/cpp/source/org/openoffice/ide/eclipse/cpp/Messages.java
new file mode 100644
index 0000000..0c6ae86
--- /dev/null
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/Messages.java
@@ -0,0 +1,22 @@
+package org.openoffice.ide.eclipse.cpp;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+    private static final String BUNDLE_NAME = "org.openoffice.ide.eclipse.cpp.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+            .getBundle(BUNDLE_NAME);
+
+    private Messages() {
+    }
+
+    public static String getString(String key) {
+        try {
+            return RESOURCE_BUNDLE.getString(key);
+        } catch (MissingResourceException e) {
+            return '!' + key + '!';
+        }
+    }
+}
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/OOoSdkProjectJob.java b/cpp/source/org/openoffice/ide/eclipse/cpp/OOoSdkProjectJob.java
index ef24b8c..95b1a7c 100644
--- a/cpp/source/org/openoffice/ide/eclipse/cpp/OOoSdkProjectJob.java
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/OOoSdkProjectJob.java
@@ -32,7 +32,7 @@ public class OOoSdkProjectJob extends Job {
     private ISdk mSdk;
     
     public OOoSdkProjectJob( IOOo pOOo, ISdk pSdk ) {
-        super( "Generating the OOo includes project for " + pOOo.getName() );
+        super( Messages.getString("OOoSdkProjectJob.Title") + pOOo.getName() ); //$NON-NLS-1$
         mOOo = pOOo;
         mSdk = pSdk;
     }
@@ -56,7 +56,7 @@ public class OOoSdkProjectJob extends Job {
     @Override
     protected IStatus run( IProgressMonitor pMonitor ) {
         
-        IStatus status = new Status( IStatus.OK, Activator.PLUGIN_ID, "UNO includes generated" );
+        IStatus status = new Status( IStatus.OK, Activator.PLUGIN_ID, Messages.getString("OOoSdkProjectJob.OkStatus") ); //$NON-NLS-1$
         
         try {
             // Create the OOo SDK project
@@ -79,7 +79,7 @@ public class OOoSdkProjectJob extends Job {
             createIncludes( prj, pMonitor );
             
         } catch ( Exception e ) {
-            status = new Status( IStatus.ERROR, Activator.PLUGIN_ID, "Failed to generate the includes", e );
+            status = new Status( IStatus.ERROR, Activator.PLUGIN_ID, Messages.getString("OOoSdkProjectJob.FailedStatus"), e ); //$NON-NLS-1$
         }
         
         return status;
@@ -126,7 +126,7 @@ public class OOoSdkProjectJob extends Job {
                             
                             StringBuffer buf = getErrorString( proc );
                             if ( !buf.toString().trim().equals( new String( ) ) ) {
-                                String msg = "Cannot link library " + libname + "\n";
+                                String msg = Messages.getString("OOoSdkProjectJob.LinkError") + libname + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
                                 msg += buf.toString();
                                 PluginLogger. error( msg );
                             }
@@ -134,7 +134,7 @@ public class OOoSdkProjectJob extends Job {
                             proc.waitFor();
                             
                         } catch ( Exception e ) {
-                            PluginLogger.error( "Cannot link library " + libname, e );
+                            PluginLogger.error( Messages.getString("OOoSdkProjectJob.LinkError") + libname, e ); //$NON-NLS-1$
                         }
                     }
                 }
@@ -165,7 +165,7 @@ public class OOoSdkProjectJob extends Job {
 
         StringBuffer buf = getErrorString( process );
         if ( !buf.toString().trim().equals( new String( ) ) ) {
-            String msg = "Error generating the includes\n";
+            String msg = Messages.getString("OOoSdkProjectJob.IncludesError"); //$NON-NLS-1$
             msg += buf.toString();
             PluginLogger. error( msg );
         }
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/client/ClientWizard.java b/cpp/source/org/openoffice/ide/eclipse/cpp/client/ClientWizard.java
index e15aa2b..8de2d6a 100644
--- a/cpp/source/org/openoffice/ide/eclipse/cpp/client/ClientWizard.java
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/client/ClientWizard.java
@@ -62,19 +62,19 @@ public class ClientWizard extends CCProjectWizard {
 
     public ClientWizard() {
         super( );
-        setWindowTitle( "UNO Client C++ project" );
+        setWindowTitle( Messages.getString("ClientWizard.Title") ); //$NON-NLS-1$
         mActivePage = WorkbenchHelper.getActivePage();
     }
     
     @Override
     public void addPages() {
         mCnxPage = new UnoConnectionPage();
-        UnoClientWizardPage mainPage = new UnoClientWizardPage( "cdtmain", mCnxPage );
+        UnoClientWizardPage mainPage = new UnoClientWizardPage( "cdtmain", mCnxPage ); //$NON-NLS-1$
         fMainPage = mainPage;
         fMainPage.setTitle( getWindowTitle() );
-        fMainPage.setDescription( "Create the UNO C++ client application project" );
+        fMainPage.setDescription( Messages.getString("ClientWizard.Description") ); //$NON-NLS-1$
         fMainPage.setImageDescriptor( Activator.imageDescriptorFromPlugin( Activator.PLUGIN_ID, 
-                "icons/uno_client_wiz.png" ) );
+                Messages.getString("ClientWizard.ClientWizardBanner") ) ); //$NON-NLS-1$
         
         addPage(fMainPage);
         
@@ -119,7 +119,7 @@ public class ClientWizard extends CCProjectWizard {
             WorkbenchHelper.showFile( srcDir.getFile( CLIENT_FILE ), mActivePage );
         
         } catch ( Exception e ) {
-            PluginLogger.error( "Couldn't set OOo Client config", e );
+            PluginLogger.error( Messages.getString("ClientWizard.ClientConfigError"), e ); //$NON-NLS-1$
         }
         
         return finished;
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/client/Messages.java b/cpp/source/org/openoffice/ide/eclipse/cpp/client/Messages.java
new file mode 100644
index 0000000..df0a7ca
--- /dev/null
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/client/Messages.java
@@ -0,0 +1,22 @@
+package org.openoffice.ide.eclipse.cpp.client;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+    private static final String BUNDLE_NAME = "org.openoffice.ide.eclipse.cpp.client.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+            .getBundle(BUNDLE_NAME);
+
+    private Messages() {
+    }
+
+    public static String getString(String key) {
+        try {
+            return RESOURCE_BUNDLE.getString(key);
+        } catch (MissingResourceException e) {
+            return '!' + key + '!';
+        }
+    }
+}
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/client/UnoConnectionPage.java b/cpp/source/org/openoffice/ide/eclipse/cpp/client/UnoConnectionPage.java
index f4fadbd..7a9d1b9 100644
--- a/cpp/source/org/openoffice/ide/eclipse/cpp/client/UnoConnectionPage.java
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/client/UnoConnectionPage.java
@@ -64,8 +64,8 @@ public class UnoConnectionPage extends WizardPage {
 
     public UnoConnectionPage( ) {
         super( "unocnxpage" ); //$NON-NLS-1$
-        setTitle( "UNO configuration" );
-        setDescription( "Set some important informations for the UNO development" );
+        setTitle( Messages.getString("UnoConnectionPage.Title") ); //$NON-NLS-1$
+        setDescription( Messages.getString("UnoConnectionPage.Description") ); //$NON-NLS-1$
     }
     
     @Override
@@ -80,7 +80,7 @@ public class UnoConnectionPage extends WizardPage {
         GridData gd = new GridData( GridData.FILL_HORIZONTAL );
         gd.horizontalSpan = LAYOUT_COLUMNS;
         confLbl.setLayoutData( gd );
-        confLbl.setText( "OpenOffice.org and SDK for building" );
+        confLbl.setText( Messages.getString("UnoConnectionPage.ConnectionLabel") ); //$NON-NLS-1$
         
         mOOoConfigPanel = new OOoConfigPanel( body );
         
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/client/messages.properties b/cpp/source/org/openoffice/ide/eclipse/cpp/client/messages.properties
new file mode 100644
index 0000000..b191293
--- /dev/null
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/client/messages.properties
@@ -0,0 +1,7 @@
+ClientWizard.ClientConfigError=Couldn't set OOo Client config
+ClientWizard.ClientWizardBanner=icons/uno_client_wiz.png
+ClientWizard.Description=Create the UNO C++ client application project
+ClientWizard.Title=UNO Client C++ project
+UnoConnectionPage.ConnectionLabel=OpenOffice.org and SDK for building
+UnoConnectionPage.Description=Set some important informations for the UNO development
+UnoConnectionPage.Title=UNO configuration
diff --git a/cpp/source/org/openoffice/ide/eclipse/cpp/messages.properties b/cpp/source/org/openoffice/ide/eclipse/cpp/messages.properties
new file mode 100644
index 0000000..043d6bd
--- /dev/null
+++ b/cpp/source/org/openoffice/ide/eclipse/cpp/messages.properties
@@ -0,0 +1,11 @@
+CDTHelper.LinkerOptionsError=Error setting linker libraries option
+CDTHelper.PathEntryError=Error setting a path entry
+CppBuilder.CppumakerError=cppumaker code generation failed
+CppBuilder.ErrorOutputUnreadable=Unreadable output error
+CppProjectHandler.NatureFailed=Failed to set C++ project nature
+CppProjectHandler.NatureSet=C++ project nature set
+OOoSdkProjectJob.FailedStatus=Failed to generate the includes
+OOoSdkProjectJob.IncludesError=Error generating the includes\n
+OOoSdkProjectJob.LinkError=Cannot link library 
+OOoSdkProjectJob.OkStatus=UNO includes generated
+OOoSdkProjectJob.Title=Generating the OOo includes project for 


More information about the ooo-build-commit mailing list