incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject svn commit: r1236486 [8/43] - in /incubator/ooo/devtools/netbeansintegration: ./ build/ build/public-package-jars/ javahelp/ javahelp/org/ javahelp/org/openoffice/ javahelp/org/openoffice/extensions/ javahelp/org/openoffice/extensions/docs/ javahelp/or...
Date Fri, 27 Jan 2012 01:29:58 GMT
Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/config/office/WinLocator.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/config/office/WinLocator.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/config/office/WinLocator.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/config/office/WinLocator.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,252 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: WinLocator.java,v $
+ *
+ *  $Revision: 1.8 $
+ *
+ *  last change: $Author: sg $ $Date: 2009/07/06 14:51:29 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+package org.openoffice.extensions.config.office;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.StringTokenizer;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.ScriptExecutor;
+
+/**
+ *
+ * @author steffen
+ */
+public class WinLocator extends PlatformLocator {
+
+    public WinLocator(String officePath, String sdkPath, boolean guessOfficePaths) {
+        super(officePath, sdkPath, guessOfficePaths);
+    }
+
+    protected void locateOfficePaths() {
+        assert mOfficePath != null;
+        assert mSdkPath != null;
+        mOfficePathsSet = false;
+        File[] baseLink = mOfficePath.listFiles(new FilenameFilter() {
+
+            public boolean accept(File path, String name) {
+                if (name.endsWith("basis-link")) { // NOI18N
+                    return true;
+                }
+                return false;
+            }
+        });
+        if (baseLink == null || baseLink.length == 0) {
+            try {
+                String path = mOfficePath.getCanonicalPath();
+                mJuhJurtRidlPath = path.concat("\\program\\classes"); // NOI18N
+                mJutUnoilPath = mJuhJurtRidlPath;
+                mUreBinPath = mSdkPath.getCanonicalPath().concat(
+                        PlatformInfo.getPlatformBinDir()).concat("\\bin");
+                mPathVariable = path.concat("\\program").concat(";").concat( // NOI18N
+                        mUreBinPath);
+                mUnorcPath = path.concat("\\program");
+                mJutUnoilPath = mJuhJurtRidlPath;
+                mTypesPath = new String[]{path.concat("\\program\\types.rdb")}; // NOI18N
+                mThreeLayerOffice = false;
+                mOfficePathsSet = true;
+            } catch (IOException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }
+        } else {
+            BufferedReader buf1 = null;
+            String basisPath = null;
+            String urePath = null;
+            File f = null;
+            try {
+                buf1 = new BufferedReader(new FileReader(baseLink[0]));
+                String append1 = buf1.readLine();
+                f = new File(mOfficePath.getCanonicalPath().concat("\\").concat(append1)); // NOI18N
+                basisPath = f.getCanonicalPath();
+            } catch (FileNotFoundException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            } catch (IOException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            } finally {
+                try {
+                    if (buf1 != null) {
+                        buf1.close();
+                    }
+                } catch (IOException ex) {
+                    LogWriter.getLogWriter().printStackTrace(ex);
+                }
+            }
+
+            File[] ureLink = f.listFiles(new FilenameFilter() {
+
+                public boolean accept(File path, String name) {
+                    if (name.endsWith("ure-link")) { // NOI18N
+                        return true;
+                    }
+                    return false;
+                }
+            });
+            if (ureLink != null && ureLink.length != 0) {
+                BufferedReader buf2 = null;
+                try {
+                    buf2 = new BufferedReader(new FileReader(ureLink[0]));
+                    String append2 = buf2.readLine();
+                    f = new File(basisPath.concat("\\").concat(append2)); // NOI18N
+                    urePath = f.getCanonicalPath();
+                } catch (FileNotFoundException ex) {
+                    LogWriter.getLogWriter().printStackTrace(ex);
+                } catch (IOException ex) {
+                    LogWriter.getLogWriter().printStackTrace(ex);
+                } finally {
+                    try {
+                        if (buf2 != null) {
+                            buf2.close();
+                        }
+                    } catch (IOException ex) {
+                        LogWriter.getLogWriter().printStackTrace(ex);
+                    }
+                }
+            }
+
+            if (basisPath != null && urePath != null) {
+                try {
+                    mJutUnoilPath = basisPath.concat("\\program\\classes"); // NOI18N
+                    mJuhJurtRidlPath = urePath.concat("\\java"); // NOI18N
+                    // the following are not the same paths on other platforms!
+                    mUnorcPath = urePath.concat("\\bin"); // NOI18N
+                    mUreBinPath = urePath.concat("\\bin"); // NOI18N
+                    mPathVariable = mOfficePath.getCanonicalPath().concat("\\program;").concat(
+                            mSdkPath.getCanonicalPath()).concat("\\bin;").concat(
+                            basisPath).concat("\\program;").concat(mUreBinPath); // // NOI18N
+                    mTypesPath = new String[]{urePath.concat("\\misc\\types.rdb"), basisPath.concat("\\program\\offapi.rdb")}; // NOI18N
+                    mThreeLayerOffice = true;
+                    mOfficePathsSet = true;
+                } catch (IOException ex) {
+                    LogWriter.getLogWriter().printStackTrace(ex);
+                }
+            }
+        }
+    }
+
+    protected void locateOffice() {
+        final String KEY = "HKLM\\SOFTWARE\\OpenOffice.org\\UNO\\InstallPath"; // NOI18N
+        final String[] VALUE = new String[]{"StarOffice 9", "OpenOffice.org 3", "StarOffice", "OpenOffice.org"}; // NOI18N
+        final String REG_SZ = "REG_SZ";
+        
+        // do not execute with new path variables: keep the ones of the user
+        ScriptExecutor.setEnv(null);
+        ScriptExecutor.executeScript(new String[]{"reg", "query", "\"".concat(KEY).concat("\"")}); // NOI18N
+        
+        if (!ScriptExecutor.hasErrors()) {
+            String output = ScriptExecutor.getOutput();
+            // parse output
+            LogWriter.getLogWriter().log(LogWriter.LEVEL_INFO, output);
+            StringTokenizer tokenizer = new StringTokenizer(output, "\r\n"); // NOI18N
+            boolean lookForPath = false;
+            int foundIndex = VALUE.length; // prefer StarOffice 9 before OOo 3 before StarOffice and so on
+            while (tokenizer.hasMoreTokens()) {
+                String next = tokenizer.nextToken().trim();
+                for (int i = 0; i < VALUE.length; i++) {
+                    if (next.startsWith(VALUE[i])) {
+                        if (foundIndex > i) {
+                            lookForPath = true;
+                            foundIndex = i;
+                        }
+                    }
+                }
+                if (lookForPath) {
+                    // take end of string after REG_SZ
+                    int index = next.indexOf(REG_SZ) + REG_SZ.length(); // NOI18N
+                    if (index <= 0) index = 0;
+                    // this is best candidate
+                    mOfficePath = new File(next.substring(index).trim()).getParentFile();
+                    lookForPath = false;
+                }
+            }
+        }
+        else {
+            // TODO: do something here?
+        }
+    }
+
+    protected void locateSDK() {
+        if (mOfficePath != null) {
+            File[] baseLink = mOfficePath.listFiles(new FilenameFilter() {
+
+                public boolean accept(File path, String name) {
+                    if (name.endsWith("basis-link")) { // NOI18N
+                        return true;
+                    }
+
+                    return false;
+                }
+            });
+            if (baseLink != null && baseLink.length > 0) {
+                BufferedReader buf1 = null;
+                try {
+                    buf1 = new BufferedReader(new FileReader(baseLink[0]));
+                    String append1 = buf1.readLine();
+                    File f = new File(mOfficePath.getCanonicalPath().concat("\\").concat(append1)); // NOI18N
+                    File[] paths = f.listFiles(new FilenameFilter() {
+
+                        public boolean accept(File dir, String name) {
+                            if (name.endsWith("sdk")) { // NOI18N
+                                return true;
+                            }
+
+                            return false;
+                        }
+                    });
+                    if (paths != null && paths.length > 0) {
+                        mSdkPath = paths[0].getCanonicalFile();
+                    }
+
+                } catch (FileNotFoundException ex) {
+                    LogWriter.getLogWriter().printStackTrace(ex);
+                } catch (IOException ex) {
+                    LogWriter.getLogWriter().printStackTrace(ex);
+                } finally {
+                    try {
+                        if (buf1 != null) {
+                            buf1.close();
+                        }
+
+                    } catch (IOException ex) {
+                        LogWriter.getLogWriter().printStackTrace(ex);
+                    }
+                }
+            }
+        }
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/config/sun_logo.png
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/config/sun_logo.png?rev=1236486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/config/sun_logo.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,21 @@
+NetBeans=NetBeans
+# NOI18N
+text/x-uno-idl=Idl
+# NOI18N
+idl-text=Text
+# NOI18N
+idl-comment=Comment
+# NOI18N
+idl-keyword=Keyword
+# NOI18N
+idl-precompiler=Precompiler
+# NOI18N
+idl-bracket=Bracket
+# NOI18N
+idl-number=Number
+# NOI18N
+idl-char=Character
+# NOI18N
+idl-string=String
+# NOI18N
+idl-function=Function

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_ja.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_ja.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_ja.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_ja.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,41 @@
+# NetBeans=NetBeans
+NetBeans=NetBeans
+# NOI18N
+# text/x-uno-idl=Idl
+text/x-uno-idl=Idl
+# NOI18N
+# idl-text=Text
+idl-text=Text
+# NOI18N
+# idl-comment=Comment
+idl-comment=Comment
+# NOI18N
+# idl-keyword=Keyword
+#idl-keyword=\u30ad\u30fc\u30ef\u30fc\u30c9
+idl-keyword=Keyword
+# NOI18N
+# idl-precompiler=Precompiler
+# idl-precompiler=\u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30e9
+idl-precompiler=Precompiler
+# NOI18N
+# idl-bracket=Bracket
+# idl-bracket=\u62ec\u5f27
+idl-bracket=Bracket
+# NOI18N
+# idl-number=Number
+# idl-number=\u6570\u5b57
+idl-number=Number
+# NOI18N
+# idl-char=Character
+# idl-char=\u6587\u5b57
+idl-char=Character
+# NOI18N
+# idl-string=String
+# idl-string=\u6587\u5b57\u5217
+idl-string=String
+# NOI18N
+# idl-function=Function
+# idl-function=\u95a2\u6570
+idl-function=Function
+
+

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_pt_BR.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_pt_BR.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_pt_BR.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_pt_BR.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,21 @@
+NetBeans=NetBeans
+# NOI18N
+text/x-uno-idl=Idl
+# NOI18N
+idl-text=Text
+# NOI18N
+idl-comment=Comment
+# NOI18N
+idl-keyword=Keyword
+# NOI18N
+idl-precompiler=Precompiler
+# NOI18N
+idl-bracket=Bracket
+# NOI18N
+idl-number=Number
+# NOI18N
+idl-char=Character
+# NOI18N
+idl-string=String
+# NOI18N
+idl-function=Function

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_zh_CN.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_zh_CN.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_zh_CN.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/Bundle_zh_CN.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,21 @@
+NetBeans=NetBeans
+# NOI18N
+text/x-uno-idl=Idl
+# NOI18N
+idl-text=Text
+# NOI18N
+idl-comment=Comment
+# NOI18N
+idl-keyword=Keyword
+# NOI18N
+idl-precompiler=Precompiler
+# NOI18N
+idl-bracket=Bracket
+# NOI18N
+idl-number=Number
+# NOI18N
+idl-char=Character
+# NOI18N
+idl-string=String
+# NOI18N
+idl-function=Function

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/RestoreColoring.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/RestoreColoring.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/RestoreColoring.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/RestoreColoring.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: RestoreColoring.java,v $
+ *
+ *  $Revision: 1.9 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/10/07 08:53:37 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.editors.unoidl;
+
+import org.netbeans.editor.Settings;
+import org.openide.modules.ModuleInstall;
+import org.openide.util.NbBundle;
+import org.openoffice.extensions.config.CodeTemplates;
+import org.openoffice.extensions.config.ConfigurationSettings;
+import org.openoffice.extensions.config.ConfigurationValidator;
+
+@SuppressWarnings( "deprecation" )         
+public class RestoreColoring extends ModuleInstall {
+
+    /**
+     * Localizer passed to editor.
+     */
+    private static org.netbeans.editor.LocaleSupport.Localizer localizer;
+
+    /**
+     * Registers properties editor, installs options and copies settings.
+     * Overrides superclass method.
+     */
+    @Override
+    public void restored() {
+        addInitializer();
+        installOptions();
+        // do nothing with the settings, see only that they are initialized
+        // since requestInstallations is not called, initializing must be done explicitly
+        ConfigurationSettings.getSettings();
+        // do insert the template code abbreviations
+        CodeTemplates.createTemplates();
+//        requestInstallations();
+    }
+    
+    /**
+     * Uninstalls properties options.
+     * And cleans up editor settings copy.
+     * Overrides superclass method.
+     */
+    @Override
+    public void uninstalled() {
+        uninstallOptions();
+    }
+    
+    /**
+     * Adds initializer and registers editor kit.
+     */
+    public void addInitializer() {
+        Settings.addInitializer(new UnoIdlSettingsInitializer());
+    }
+    
+    /**
+     * Installs properties editor and print options.
+     */
+    public void installOptions() {
+        // Adds localizer.
+        org.netbeans.editor.LocaleSupport.addLocalizer(localizer = new org.netbeans.editor.LocaleSupport.Localizer() {
+            public String getString(String key) {
+                return NbBundle.getMessage(RestoreColoring.class, key);
+            }
+        }); 
+    }
+    
+    /** Uninstalls properties editor and print options. */
+    public void uninstallOptions() {
+        // remove localizer
+        org.netbeans.editor.LocaleSupport.removeLocalizer(localizer);
+    }
+ 
+    private void requestInstallations() {
+        ConfigurationValidator.validateSettings();
+    }
+
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlEditorKit.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlEditorKit.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlEditorKit.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlEditorKit.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: UnoIdlEditorKit.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/04/28 10:54:25 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.editors.unoidl;
+
+import javax.swing.text.Document;
+//import org.netbeans.editor.BaseDocument;
+import org.netbeans.editor.Syntax;
+//import org.netbeans.editor.SyntaxSupport;
+import org.netbeans.modules.editor.NbEditorKit;
+//import org.openide.ErrorManager;
+
+/**
+ *
+ */
+public class UnoIdlEditorKit extends NbEditorKit {
+    
+    public static final String MIME_TYPE = "text/x-uno-idl"; // NOI18N
+    
+    /**
+     * 
+     * Creates a new instance of UnoIdlEditorKit
+     */
+    public UnoIdlEditorKit() { 
+    }
+    
+    /**
+     * Create a syntax object suitable for highlighting Idl file syntax
+     */
+    @Override
+    public Syntax createSyntax(Document doc) {  
+        return new UnoIdlSyntax();
+    }
+    
+    /**
+     * Retrieves the content type for this editor kit
+     */
+    @Override
+    public String getContentType() {
+        return MIME_TYPE;
+    }    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlSettingsInitializer.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlSettingsInitializer.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlSettingsInitializer.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlSettingsInitializer.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: UnoIdlSettingsInitializer.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: jsc $ $Date: 2006/07/07 15:25:32 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.editors.unoidl;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.util.Map;
+import org.netbeans.editor.BaseKit;
+import org.netbeans.editor.Coloring;
+import org.netbeans.editor.Settings;
+import org.netbeans.editor.SettingsDefaults;
+import org.netbeans.editor.SettingsNames;
+import org.netbeans.editor.SettingsUtil;
+import org.netbeans.editor.TokenCategory;
+import org.netbeans.editor.TokenContext;
+import org.netbeans.editor.TokenContextPath;
+
+/**
+ *
+ * @author Steffen
+ */
+public class UnoIdlSettingsInitializer extends Settings.AbstractInitializer {
+    
+    public static final String NAME = "uno-idl-settings-initializer"; // NOI18N
+    
+    /**
+     * Constructor
+     */
+    public UnoIdlSettingsInitializer() {
+        super(NAME);
+    }
+    
+    /**
+     * Update map filled with the settings.
+     * @param kitClass kit class for which the settings are being updated.
+     *   It is always non-null value.
+     * @param settingsMap map holding [setting-name, setting-value] pairs.
+     *   The map can be empty if this is the first initializer
+     *   that updates it or if no previous initializers updated it.
+     */
+    public void updateSettingsMap(Class kitClass, Map settingsMap) {
+        if (kitClass == BaseKit.class) {
+            new IdlTokenColoringInitializer().updateSettingsMap(kitClass, settingsMap);
+        }
+        
+        if (kitClass == UnoIdlEditorKit.class) {
+            SettingsUtil.updateListSetting(
+                    settingsMap,
+                    SettingsNames.TOKEN_CONTEXT_LIST,
+                    new TokenContext[] { UnoIdlTokenContext.context }
+            );
+        }
+    }
+    
+    /**
+     * Class for adding syntax coloring to the editor
+     */
+    /** Properties token coloring initializer. */
+    private static class IdlTokenColoringInitializer extends SettingsUtil.TokenColoringInitializer {
+        
+        /** Bold font. */
+        private static final Font boldFont = SettingsDefaults.defaultFont.deriveFont(Font.BOLD);
+        /** Italic font. */
+        private static final Font italicFont = SettingsDefaults.defaultFont.deriveFont(Font.ITALIC);
+        
+        /** Key coloring. */
+	private static final Coloring textColoring
+		= new Coloring(null, Color.BLACK, null);
+        /** Keyword coloring. */
+        private static final Coloring keywordColoring = new Coloring(boldFont, Coloring.FONT_MODE_APPLY_STYLE, Color.BLUE, null);
+        /** Bracket coloring. */
+        private static final Coloring bracketColoring = new Coloring(null, Color.BLUE, null);
+        /** Precompile coloring. */
+        private static final Coloring precompileColoring = new Coloring(null, Color.GREEN, null);
+        /** Comment coloring. */
+        private static final Coloring commentColoring = new Coloring(null, Color.GRAY, null);
+        /** Empty coloring. */
+        private static final Coloring emptyColoring = new Coloring(null, null, null);
+        /** Precompile coloring. */
+        private static final Coloring charColoring = new Coloring(null, Color.GREEN, null);
+        /** Comment coloring. */
+        private static final Coloring stringColoring = new Coloring(null, Color.MAGENTA, null);
+        /** Empty coloring. */
+        private static final Coloring numberColoring = new Coloring(null, Color.RED, null);
+        
+        /** Constructs PropertiesTokenColoringInitializer. */
+        public IdlTokenColoringInitializer() {
+            super(UnoIdlTokenContext.context);
+        }       
+        
+        /** Gets token coloring. */
+        public Object getTokenColoring(TokenContextPath tokenContextPath,
+                TokenCategory tokenIDOrCategory, boolean printingSet) {
+            
+            if(!printingSet) {
+                int tokenID = tokenIDOrCategory.getNumericID();
+
+                switch (tokenID) {
+                    case UnoIdlTokenContext.TEXT_ID:
+                        return textColoring;
+                    case UnoIdlTokenContext.FUNCTION_ID:
+                        return textColoring;
+                    case UnoIdlTokenContext.COMMENT_ID:
+                        return commentColoring;
+                    case UnoIdlTokenContext.BRACKET_TEXT_ID:
+                        return bracketColoring;
+                    case UnoIdlTokenContext.KEYWORD_ID:
+                        return keywordColoring;
+                    case UnoIdlTokenContext.NUMBER_ID:
+                        return numberColoring;
+                    case UnoIdlTokenContext.CHAR_ID:
+                        return charColoring;
+                    case UnoIdlTokenContext.STRING_ID:
+                        return stringColoring;
+                    case UnoIdlTokenContext.PRECOMPILE_ID:
+                        return precompileColoring;
+                    default:        
+                        return null;
+                }
+            } else { // printing set
+                return SettingsUtil.defaultPrintColoringEvaluator;
+            }
+        }
+        
+    } 
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlSyntax.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlSyntax.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlSyntax.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlSyntax.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,379 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: UnoIdlSyntax.java,v $
+ *
+ *  $Revision: 1.5 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/09/06 17:14:11 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.editors.unoidl;
+
+import org.netbeans.editor.Syntax;
+import org.netbeans.editor.TokenID;
+import org.openoffice.extensions.util.LogWriter;
+
+/**
+ *
+ */
+public class UnoIdlSyntax extends Syntax {
+//    private static final ErrorManager LOGGER = ErrorManager.getDefault().getInstance("org.openoffice.unoidleditor.IdlSyntax"); // NOI18N
+//    private static final boolean LOG = LOGGER.isLoggable(ErrorManager.INFORMATIONAL);
+
+    private static final int ISI_BLOCK_COMMENT = 1;
+    private static final int ISI_COMMENT_START = 2;
+    private static final int ISI_STAR_IN_BLOCK_COMMENT = 3;
+    private static final int ISI_LINE_COMMENT = 4;
+    private static final int ISI_TEXT = 5;
+    private static final int ISI_WHITESPACE = 6;
+    private static final int ISI_KEYWORD = 7;
+    private static final int ISI_PRECOMPILER = 8;
+    private static final int ISI_OPENING_BRACKET = 9;
+    private static final int ISI_TEXT_IN_BRACKETS = 10;
+    private static final int ISI_DOUBLE_QUOTE = 11;
+    private static final int ISI_SINGLE_QUOTE = 12;
+    private static final int ISI_BACKSLASH_IN_DOUBLE_QUOTE = 13;
+    private static final int ISI_BACKSLASH_IN_SINGLE_QUOTE = 14;
+    private static final int ISI_NUMBER = 15;
+    private static final int ISI_FUNCTION = 16;
+
+    /** all recognized keywords **/
+    private static final String[] KEYWORDS = {  
+        // idl file types
+        "constants", "enum", "exception", "interface", "service", "struct", 
+        "singleton",
+        // data types
+        "any", "boolean", "byte", "char", "double", "float", "hyper", "long", 
+        "sequence", "short", "string", "type", "void",
+        // modifiers
+        "const", "published", "unsigned", 
+        // namespace
+        "module", 
+        // exceptions
+        "raises",  
+    }; // NOI18N
+
+    /**
+     * Creates a new instance of UnoIdlSyntax
+     */
+    public UnoIdlSyntax() {
+        tokenContextPath = UnoIdlTokenContext.contextPath;
+    }
+    
+    public UnoIdlSyntax(char[] theBuffer) {
+        this.buffer = theBuffer;
+        // initialize local variables with meaningful values
+        this.state = INIT;
+        this.offset = 0;
+        this.stopOffset = theBuffer.length - 1;
+    }
+    
+    public TokenID parseNextToken() {
+        return doParseToken();
+    }
+    
+    protected TokenID parseToken() {
+        TokenID result = doParseToken();
+        LogWriter.getLogWriter().log(LogWriter.LEVEL_INFO, "parseToken: " + result); // NOI18N
+        return result;
+    }
+    
+    private TokenID doParseToken() {
+        char actChar;
+
+        // get the state with a lookahead function
+        int[] offsetAndState = getNextState(buffer, offset, stopOffset, state);
+        // add the count of chars used for determining the lookahead 
+        // to the offset
+        offset += offsetAndState[0];
+        // set the state
+        state = offsetAndState[1];
+        // go to the end of the state and return a token.
+        while (offset < stopOffset) {
+            actChar = buffer[offset];
+            switch(state) {
+                case ISI_LINE_COMMENT:
+                    switch (actChar) {
+                        case '\n': // NOI18N
+                            offset++;
+                            return UnoIdlTokenContext.COMMENT;
+                    }
+                break;    
+                case ISI_BLOCK_COMMENT:
+                    switch (actChar) {
+                        case '*': // NOI18N
+                            state = ISI_STAR_IN_BLOCK_COMMENT;
+                            break;
+                    }
+                break;
+                case ISI_STAR_IN_BLOCK_COMMENT:
+                    switch (actChar) {
+                        case '/': // NOI18N
+                            offset++;
+                            return UnoIdlTokenContext.COMMENT;
+                        case '*': // NOI18N
+                            // state stays the same; just here to show it
+                        break;
+                        default:
+                            state = ISI_BLOCK_COMMENT;
+                    }
+                break;
+                case ISI_PRECOMPILER: //have read this already
+                    offset++;
+                    return UnoIdlTokenContext.PRECOMPILE;
+                case ISI_KEYWORD:
+                    // offset++ is not necessary; we're one further because the length
+                    // of the keyword is added to offset.
+                    return UnoIdlTokenContext.KEYWORD;
+                case ISI_TEXT:
+                    int[] nextStuff = getNextState(buffer, offset, stopOffset, state);
+                    int newState = nextStuff[1];  // not really interested in offset
+                    // switch between text and whitespace: only in whitespace mode
+                    // are numbers allowed; this way they always start with a whitespace
+                    if (newState == ISI_WHITESPACE) {
+                        state = ISI_WHITESPACE;
+                    }
+                    else if (newState != ISI_TEXT) { 
+                        return UnoIdlTokenContext.TEXT;
+                    }
+                break;
+                case ISI_WHITESPACE:
+                    nextStuff = getNextState(buffer, offset, stopOffset, state);
+                    newState = nextStuff[1];  // not really interested in offset
+                    if (newState == ISI_TEXT) {
+                        state = ISI_TEXT;
+                    }
+                    else if (newState != ISI_WHITESPACE) { 
+                        return UnoIdlTokenContext.TEXT;
+                    }
+                break;
+                case ISI_OPENING_BRACKET:
+                    offset++;
+                    state = ISI_TEXT_IN_BRACKETS;
+                    return UnoIdlTokenContext.TEXT;
+                case ISI_TEXT_IN_BRACKETS:
+                    switch (actChar) {
+                        case ']': // NOI18N // closing bracket found
+                            state = ISI_TEXT;
+                            // no offset++ because ']' is not part of the token, it's only
+                            // the text inside
+                            return UnoIdlTokenContext.BRACKET_TEXT;
+                        // default: state stays the same...
+                    }
+                break;
+                case ISI_DOUBLE_QUOTE:
+                    switch (actChar) {
+                        case '\"': // NOI18N // closing double quote found.
+                            offset++;
+                            return UnoIdlTokenContext.STRING;
+                        case '\\': // NOI18N
+                            state = ISI_BACKSLASH_IN_DOUBLE_QUOTE;
+                            break;
+                        // default: state stays the same...
+                    }
+                break;
+                case ISI_BACKSLASH_IN_DOUBLE_QUOTE: // do not react on any char
+                    state = ISI_DOUBLE_QUOTE;
+                break;
+                case ISI_SINGLE_QUOTE:
+                    switch (actChar) {
+                        case '\'': // NOI18N // closing single quote found.
+                            offset++;
+                            return UnoIdlTokenContext.CHAR;
+                        case '\\': // NOI18N
+                            state = ISI_BACKSLASH_IN_SINGLE_QUOTE;
+                            break;
+                        // default: state stays the same...
+                    }
+                break;
+                case ISI_BACKSLASH_IN_SINGLE_QUOTE: // do not react on any char
+                    state = ISI_SINGLE_QUOTE;
+                break;
+                case ISI_NUMBER:
+                    if ((actChar > '9' || actChar < '0') && actChar != '.') {
+                        // offset++ is not needed: now we're after the number
+                        return UnoIdlTokenContext.NUMBER;
+                    }
+                    // do nothing in every other case
+                break;
+            }
+            offset++;
+        }
+        switch(state) {
+            case ISI_BLOCK_COMMENT:
+            case ISI_LINE_COMMENT:
+                return UnoIdlTokenContext.COMMENT;
+            case ISI_WHITESPACE:
+            case ISI_TEXT:
+            case ISI_FUNCTION:
+                return UnoIdlTokenContext.TEXT;
+            case ISI_KEYWORD:
+                return UnoIdlTokenContext.KEYWORD;
+            case ISI_PRECOMPILER:
+                return UnoIdlTokenContext.PRECOMPILE;
+            case ISI_TEXT_IN_BRACKETS:
+                return UnoIdlTokenContext.BRACKET_TEXT;
+            case ISI_DOUBLE_QUOTE:
+                return UnoIdlTokenContext.STRING;
+            case ISI_SINGLE_QUOTE:
+                return UnoIdlTokenContext.CHAR;
+            case ISI_NUMBER:
+                return UnoIdlTokenContext.NUMBER;
+        }
+        return null;
+    }
+
+    /**
+     * take the next n chars to determine the next state for reading the buffer.
+     * start with char at offset and take no more than stopOffset-offset chars from 
+     * buffer.
+     * @return array of length 2; index 0 is the count which is added to offset;
+     * index 1 is the state we're now in.
+     */
+    private int[] getNextState(
+                    char[] buffer, int localOffset, int stopOffset, int oldState) {
+        if (oldState == ISI_BLOCK_COMMENT) {
+            return new int[]{0, oldState};
+        }
+        if (oldState == ISI_TEXT_IN_BRACKETS) {
+            return new int[]{0, oldState};
+        }
+        int newState = INIT;
+        int offsetAdd = 0;
+        char nextChar = buffer[localOffset];
+        if (nextChar == '/' && ++localOffset < stopOffset) { // one more char for a comment
+            nextChar = buffer[localOffset];
+            switch(nextChar) {
+                case '*':
+                    newState = ISI_BLOCK_COMMENT;
+                    offsetAdd = 2;
+                    break;
+                case '/':
+                    newState = ISI_LINE_COMMENT;
+                    offsetAdd = 2;
+                    break;
+                default: 
+                    newState = ISI_TEXT;
+                    offsetAdd = 1;
+            }
+        }
+        else if (nextChar == '#') { // precompiler statement
+            while(!Character.isWhitespace(nextChar) && localOffset + ++offsetAdd < stopOffset) {
+                nextChar = buffer[localOffset + offsetAdd];
+            }
+            newState = ISI_PRECOMPILER;
+        }
+        else if (nextChar == '[') { // opening bracket
+            newState = ISI_OPENING_BRACKET;
+        }
+        else if (nextChar == '\\') { 
+            newState = ISI_TEXT; // if this is the beginning, it's surely text
+            offsetAdd++; // jump over the next char
+        }
+        else if (nextChar == '\"') { // NOI18N // opening bracket
+            // strange stuff may happen if a file ever starts with a quote, but that's a syntax error anyway...'
+            newState = ISI_DOUBLE_QUOTE;
+            offsetAdd++;
+        }
+        else if (nextChar == '\'') { // opening bracket
+            newState = ISI_SINGLE_QUOTE;
+            offsetAdd++;
+        }
+        else if (nextChar <= '9' && nextChar >= '0') { // numeric!
+            if (oldState == ISI_WHITESPACE) {
+                newState = ISI_NUMBER;
+            }
+            else {
+                newState = ISI_TEXT;
+            }
+        }
+        else if (nextChar == '.') { // lookahead for next char to make sure it's a number
+            if (localOffset + ++offsetAdd < stopOffset) {
+                nextChar = buffer[localOffset + offsetAdd];
+                if (nextChar <= '9' && nextChar >= '0') {
+                    newState = ISI_NUMBER;
+                    offsetAdd++;
+                }
+                else {
+                    newState = ISI_TEXT;
+                }
+            }
+        }
+        else {
+            if (oldState != ISI_TEXT) {
+                String keyword = getKeyword(buffer, localOffset, stopOffset);
+                if (keyword == null) {
+                    if (Character.isWhitespace(nextChar)) {
+                        newState = ISI_WHITESPACE;
+                    }
+                    else {
+                        newState = ISI_TEXT;
+                    }
+                }
+                else {
+                    newState = ISI_KEYWORD;
+                    this.tokenLength = keyword.length();
+                    offsetAdd = tokenLength;
+                }
+            }
+            else {
+                if (Character.isWhitespace(nextChar)) {
+                    newState = ISI_WHITESPACE;
+                }
+                else {
+                    newState = ISI_TEXT;
+                }
+            }
+        }
+        return new int[] {offsetAdd, newState};
+    }
+    
+    /**
+     * returns the keyword if it was found in the buffer
+     */
+    private static String getKeyword(char[]buffer, int offset, int stopOffset) {
+        for (int i=0; i<KEYWORDS.length; i++) {
+            String keyword = KEYWORDS[i];
+            if (keyword.length() + offset < stopOffset) {
+                String match = String.copyValueOf(
+                        buffer, offset, keyword.length());
+                // check if after the keyword's a whitespace!
+                if (match.equals(keyword)) {
+                    if (buffer.length > offset + keyword.length()) {
+                        if (Character.isWhitespace(buffer[offset + keyword.length()]))
+                            return keyword;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+}
+
+

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlTokenContext.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlTokenContext.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlTokenContext.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/UnoIdlTokenContext.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: UnoIdlTokenContext.java,v $
+ *
+ *  $Revision: 1.3 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/02/08 12:58:41 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.editors.unoidl;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.netbeans.editor.BaseTokenID;
+import org.netbeans.editor.TokenContext;
+import org.netbeans.editor.TokenContextPath;
+
+/**
+ *
+ */
+public class UnoIdlTokenContext extends TokenContext  {
+    
+      // Numeric-ids for token categories
+    public static final int TEXT_ID = 1;
+    public static final int STRING_ID = 2;
+    public static final int NUMBER_ID = 3;   
+    public static final int BRACKET_TEXT_ID = 4;
+    public static final int PRECOMPILE_ID = 5;
+    public static final int COMMENT_ID = 6;
+    public static final int KEYWORD_ID = 7;
+    public static final int CHAR_ID = 8;
+    public static final int FUNCTION_ID = 9;
+    
+    // Token-ids
+    public static final BaseTokenID TEXT = new BaseTokenID("text", TEXT_ID); // NOI18N
+    public static final BaseTokenID STRING = new BaseTokenID("string", STRING_ID); // NOI18N
+    public static final BaseTokenID NUMBER = new BaseTokenID("number", NUMBER_ID); // NOI18N
+    public static final BaseTokenID COMMENT = new BaseTokenID("comment", COMMENT_ID); // NOI18N
+    public static final BaseTokenID KEYWORD = new BaseTokenID("keyword", KEYWORD_ID); // NOI18N
+    public static final BaseTokenID PRECOMPILE = new BaseTokenID("precompiler", PRECOMPILE_ID); // NOI18N
+    public static final BaseTokenID BRACKET_TEXT = new BaseTokenID("bracket", BRACKET_TEXT_ID); // NOI18N
+    public static final BaseTokenID CHAR = new BaseTokenID("char", CHAR_ID); // NOI18N
+    public static final BaseTokenID FUNCTION = new BaseTokenID("function", FUNCTION_ID); // NOI18N
+
+    // Context instance declaration
+    public static final UnoIdlTokenContext context = new UnoIdlTokenContext();
+    public static final TokenContextPath contextPath = context.getContextPath();
+    
+    /**
+     * Construct a new UnoIdlTokenContext
+     */
+    private UnoIdlTokenContext() {
+        super("idl-"); // NOI18N
+        
+        try {
+            addDeclaredTokenIDs();
+        } catch (Exception e) {
+            Logger.getLogger(UnoIdlTokenContext.class.getName()).log(Level.SEVERE, null, e);
+        }
+    }    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/idlfile.png
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/idlfile.png?rev=1236486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/idlfile.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1 @@
+OPTIONS_Idl=Idl Editor
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_ja.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_ja.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_ja.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_ja.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,4 @@
+# OPTIONS_Idl=Idl Editor
+OPTIONS_Idl=Idl \u30a8\u30c7\u30a3\u30bf
+
+

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_pt_BR.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_pt_BR.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_pt_BR.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_pt_BR.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1 @@
+OPTIONS_Idl=Idl Editor
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_zh_CN.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_zh_CN.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_zh_CN.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/Bundle_zh_CN.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1 @@
+OPTIONS_Idl=Idl \u7f16\u8f91\u5668

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptions.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptions.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptions.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptions.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: IdlOptions.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: jsc $ $Date: 2006/07/07 15:27:43 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.editors.unoidl.options;
+
+import java.util.MissingResourceException;
+import org.netbeans.modules.editor.options.BaseOptions;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openoffice.extensions.editors.unoidl.UnoIdlEditorKit;
+
+public class IdlOptions extends BaseOptions {
+    
+    public static String IDL = "Idl"; // NOI18N
+    
+    /** Name of property. */
+    private static final String HELP_ID = "editing.editor.idl"; // NOI18N
+    
+    //no idl specific options at this time
+    static final String[] IDL_PROP_NAMES = new String[] {};
+    
+    public IdlOptions() {
+        super(UnoIdlEditorKit.class, IDL);
+    }
+    
+    /**
+     * Gets the help ID
+     */
+    public HelpCtx getHelpCtx() {
+        return new HelpCtx(HELP_ID);
+    }
+    
+    /**
+     * Look up a resource bundle message, if it is not found locally defer to
+     * the super implementation
+     */
+    protected String getString(String key) {
+        try {
+            return NbBundle.getMessage(IdlOptions.class, key);
+        } catch (MissingResourceException e) {
+            return super.getString(key);
+        }
+    }
+}
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptions.settings
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptions.settings?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptions.settings (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptions.settings Fri Jan 27 01:29:33 2012
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE settings PUBLIC "-//NetBeans//DTD Session settings 1.0//EN" "http://www.netbeans.org/dtds/sessionsettings-1_0.dtd">
+<settings version="1.0">
+    <module name="org.openoffice.extensions"/>
+    <instanceof class="java.io.Externalizable"/>
+    <instanceof class="org.openide.util.SharedClassObject"/>
+    <instanceof class="java.beans.beancontext.BeanContextProxy"/>
+    <instanceof class="java.io.Serializable"/>
+    <instanceof class="org.openide.options.SystemOption"/>
+    <instanceof class="org.netbeans.modules.editor.options.OptionSupport"/>
+    <instanceof class="org.netbeans.modules.editor.options.BaseOptions"/>
+    <instance class="org.openoffice.extensions.editors.unoidl.options.IdlOptions"/>
+</settings>
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptionsBeanInfo.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptionsBeanInfo.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptionsBeanInfo.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/IdlOptionsBeanInfo.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: IdlOptionsBeanInfo.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: jsc $ $Date: 2006/07/07 15:27:53 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+
+package org.openoffice.extensions.editors.unoidl.options;
+
+import java.util.MissingResourceException;
+import org.netbeans.modules.editor.options.BaseOptionsBeanInfo;
+import org.netbeans.modules.editor.options.OptionSupport;
+import org.openide.util.NbBundle;
+
+public class IdlOptionsBeanInfo extends BaseOptionsBeanInfo {
+    
+    /**
+     * Constructor. The parameter in the superclass constructor is the
+     * icon prefix. 
+     */
+    public IdlOptionsBeanInfo() {
+        super("/org/openoffice/unoidleditor/options/idlOptions"); // NOI18N
+    }
+    
+    /*
+     * Gets the property names after merging it with the set of properties
+     * available from the BaseOptions from the editor module.
+     */
+    protected String[] getPropNames() {
+        return OptionSupport.mergeStringArrays(
+                super.getPropNames(),
+                IdlOptions.IDL_PROP_NAMES);
+    }
+    
+    /**
+     * Get the class described by this bean info
+     */
+    protected Class getBeanClass() {
+        return IdlOptions.class;
+    }
+    
+    /**
+     * Look up a resource bundle message, if it is not found locally defer to
+     * the super implementation
+     */
+    protected String getString(String key) {
+        try {
+            return NbBundle.getMessage(IdlOptionsBeanInfo.class, key);
+        } catch (MissingResourceException e) {
+            return super.getString(key);
+        }
+    }
+}
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/idlOptions.gif
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/idlOptions.gif?rev=1236486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/options/idlOptions.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/CityLights-Properties-fontsColors.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/CityLights-Properties-fontsColors.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/CityLights-Properties-fontsColors.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/CityLights-Properties-fontsColors.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fontscolors>
+    <fontcolor name="idl-text" default="default"/>
+    <fontcolor name="idl-comment" default="default"/>
+    <fontcolor name="idl-keyword" default="default"/>
+    <fontcolor name="idl-precompiler" default="default"/>
+    <fontcolor name="idl-bracket" default="default"/>
+    <fontcolor name="idl-number" default="default"/>
+    <fontcolor name="idl-char" default="default"/>
+    <fontcolor name="idl-string" default="default"/>
+    <fontcolor name="idl-function" default="default"/>
+</fontscolors>
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/IdlExample
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/IdlExample?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/IdlExample (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/IdlExample Fri Jan 27 01:29:33 2012
@@ -0,0 +1,7 @@
+/* block comment */
+#ifndef condition
+#define value
+module tst {  // line comment
+    service tst { interface XI; };
+};
+#endif
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/NetBeans-Idl-fontsColors.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/NetBeans-Idl-fontsColors.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/NetBeans-Idl-fontsColors.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/editors/unoidl/resources/NetBeans-Idl-fontsColors.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fontscolors>
+    <fontcolor name="idl-text" foreColor="black" default="default"/>
+    <fontcolor name="idl-comment" foreColor="gray" default="default"/>
+    <fontcolor name="idl-keyword" foreColor="blue" default="default">
+        <font style="bold" />
+    </fontcolor>
+    <fontcolor name="idl-precompiler" foreColor="ff00aa00" default="default"/>
+    <fontcolor name="idl-bracket" foreColor="blue" default="default"/>
+    <fontcolor name="idl-number" foreColor="red" default="default"/>
+    <fontcolor name="idl-char" foreColor="ff00aa00" default="default"/>
+    <fontcolor name="idl-string" foreColor="magenta" default="default"/>
+    <fontcolor name="idl-function" foreColor="black" default="default">
+        <font style="bold" />
+    </fontcolor>
+</fontscolors>
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/extensions-helpset.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/extensions-helpset.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/extensions-helpset.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/extensions-helpset.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE helpsetref PUBLIC "-//NetBeans//DTD JavaHelp Help Set Reference 1.0//EN" "http://www.netbeans.org/dtds/helpsetref-1_0.dtd">
+<helpsetref url="nbdocs:/org/openoffice/extensions/docs/extensions-hs.xml"/>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,19 @@
+LBL_ImplObject_loader_name=Java UNO Objects
+LBL_TypeBrowser_Title=Select Services
+ImplObjectVisualPanelName=Java UNO Object
+
+Templates/org-openoffice-extensions/ImplObjectTemplate.java=Java UNO Object
+Services/MIMEResolver/ImplObjectResolver.xml=Java UNO Objects
+
+# lables for the UI
+LBL_ClassName=Class &Name:
+LBL_BUTTON_SelectService=S&elect...
+LBL_Service=&IDL Type\:
+LBL_Project=Project\:
+LBL_Location=Location\:
+LBL_Package=&Package\:
+LBL_DataType=Data &Type
+LBL_CreatedFile=Created File\:
+
+ERROR_MiisingService=There must be a Service or Interface specified.
+ERROR_NameClash=The Java object must have a different name than the Service/Interfaces.
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_ja.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_ja.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_ja.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_ja.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,34 @@
+# LBL_ImplObject_loader_name=Java UNO Objects
+LBL_ImplObject_loader_name=Java UNO \u30aa\u30d6\u30b8\u30a7\u30af\u30c8
+# LBL_TypeBrowser_Title=Select Services
+LBL_TypeBrowser_Title=\u30b5\u30fc\u30d3\u30b9\u3092\u9078\u629e
+# ImplObjectVisualPanelName=Java UNO Object
+ImplObjectVisualPanelName=Java UNO \u30aa\u30d6\u30b8\u30a7\u30af\u30c8
+
+# Templates/org-openoffice-extensions/ImplObjectTemplate.java=Java UNO Object
+Templates/org-openoffice-extensions/ImplObjectTemplate.java=Java UNO \u30aa\u30d6\u30b8\u30a7\u30af\u30c8
+# Services/MIMEResolver/ImplObjectResolver.xml=Java UNO Objects
+Services/MIMEResolver/ImplObjectResolver.xml=Java UNO \u30aa\u30d6\u30b8\u30a7\u30af\u30c8
+
+# lables for the UI
+# LBL_ClassName=Class &Name:
+LBL_ClassName=\u30af\u30e9\u30b9\u540d(&N):
+# LBL_BUTTON_SelectService=S&elect...
+LBL_BUTTON_SelectService=\u9078\u629e(&E)...
+# LBL_Service=&Service\:
+LBL_Service=\u30b5\u30fc\u30d3\u30b9(&S)\:
+# LBL_Project=Project\:
+LBL_Project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\:
+# LBL_Location=Location\:
+LBL_Location=\u5834\u6240\:
+# LBL_Package=&Package\:
+LBL_Package=\u30d1\u30c3\u30b1\u30fc\u30b8(&P)\:
+# LBL_DataType=Data &Type
+LBL_DataType=\u30c7\u30fc\u30bf\u578b(&T)
+# LBL_CreatedFile=Created File\:
+LBL_CreatedFile=\u4f5c\u6210\u3055\u308c\u308b\u30d5\u30a1\u30a4\u30eb(C)\:
+
+# ERROR_MiisingService=There must be a Service or Interface specified.
+ERROR_MiisingService=\u30b5\u30fc\u30d3\u30b9\u307e\u305f\u306f\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u306e\u6307\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002
+
+

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_pt_BR.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_pt_BR.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_pt_BR.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_pt_BR.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,18 @@
+LBL_ImplObject_loader_name=Java UNO Objects
+LBL_TypeBrowser_Title=Select Services
+ImplObjectVisualPanelName=Java UNO Object
+
+Templates/org-openoffice-extensions/ImplObjectTemplate.java=Java UNO Object
+Services/MIMEResolver/ImplObjectResolver.xml=Java UNO Objects
+
+# lables for the UI
+LBL_ClassName=Class &Name:
+LBL_BUTTON_SelectService=S&elect...
+LBL_Service=&Service\:
+LBL_Project=Project\:
+LBL_Location=Location\:
+LBL_Package=&Package\:
+LBL_DataType=Data &Type
+LBL_CreatedFile=Created File\:
+
+ERROR_MiisingService=There must be a Service or Interface specified.
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_zh_CN.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_zh_CN.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_zh_CN.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/Bundle_zh_CN.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,18 @@
+LBL_ImplObject_loader_name=Java UNO \u5bf9\u8c61
+LBL_TypeBrowser_Title=\u9009\u62e9\u670d\u52a1
+ImplObjectVisualPanelName=Java UNO \u5bf9\u8c61
+
+Templates/org-openoffice-extensions/ImplObjectTemplate.java=Java UNO \u5bf9\u8c61
+Services/MIMEResolver/ImplObjectResolver.xml=Java UNO \u5bf9\u8c61
+
+# lables for the UI
+LBL_ClassName=\u7c7b\u540d(&N)\uff1a
+LBL_BUTTON_SelectService=\u9009\u62e9(&E)...
+LBL_Service=\u670d\u52a1(&S)\uff1a
+LBL_Project=\u9879\u76ee\uff1a
+LBL_Location=\u4f4d\u7f6e\uff1a
+LBL_Package=\u5305(&P)\uff1a
+LBL_DataType=\u6570\u636e\u7c7b\u578b(&T)
+LBL_CreatedFile=\u521b\u5efa\u7684\u6587\u4ef6\uff1a
+
+ERROR_MiisingService=\u5fc5\u987b\u6307\u5b9a\u4e00\u4e2a\u670d\u52a1\u6216\u63a5\u53e3\u3002

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataLoader.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataLoader.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataLoader.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataLoader.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: ImplObjectDataLoader.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/08/15 13:45:23 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+package org.openoffice.extensions.filetypes.implobject;
+
+import java.io.IOException;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataObjectExistsException;
+import org.openide.loaders.MultiDataObject;
+import org.openide.loaders.UniFileLoader;
+import org.openide.util.NbBundle;
+
+public class ImplObjectDataLoader extends UniFileLoader {
+    
+    public static final String REQUIRED_MIME = "text/x-java"; // NOI18N
+    
+    private static final long serialVersionUID = 1L;
+    
+    public ImplObjectDataLoader() {
+        super("org.openoffice.extensions.filetypes.implobject.ImplObjectDataObject"); // NOI18N
+    }
+    
+    protected String defaultDisplayName() {
+        return NbBundle.getMessage(ImplObjectDataLoader.class, "LBL_ImplObject_loader_name"); // NOI18N
+    }
+    
+    protected void initialize() {
+        super.initialize();
+        getExtensions().addMimeType(REQUIRED_MIME);
+    }
+    
+    protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException {
+        return new ImplObjectDataObject(primaryFile, this);
+    }
+    
+    protected String actionsContext() {
+        return "Loaders/" + REQUIRED_MIME + "/Actions"; // NOI18N
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataLoaderBeanInfo.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataLoaderBeanInfo.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataLoaderBeanInfo.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataLoaderBeanInfo.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: ImplObjectDataLoaderBeanInfo.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  last change: $Author: sg $ $Date: 2009/07/06 14:51:27 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+package org.openoffice.extensions.filetypes.implobject;
+
+import java.awt.Image;
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.SimpleBeanInfo;
+import org.openide.loaders.UniFileLoader;
+import org.openide.util.ImageUtilities;
+
+public class ImplObjectDataLoaderBeanInfo extends SimpleBeanInfo {
+    
+    public BeanInfo[] getAdditionalBeanInfo() {
+        try {
+            return new BeanInfo[] {Introspector.getBeanInfo(UniFileLoader.class)};
+        } catch (IntrospectionException e) {
+            throw new AssertionError(e);
+        }
+    }
+    
+    public Image getIcon(int type) {
+        if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
+            return ImageUtilities.loadImage("org/openoffice/extensions/filetypes/unoidl/idlfile.png"); // NOI18N
+        } else {
+            return null;
+        }
+        
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataNode.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataNode.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataNode.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataNode.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: ImplObjectDataNode.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/08/15 13:45:23 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+package org.openoffice.extensions.filetypes.implobject;
+
+import org.openide.loaders.DataNode;
+import org.openide.nodes.Children;
+
+public class ImplObjectDataNode extends DataNode {
+    
+    private static final String IMAGE_ICON_BASE = 
+        "org/openoffice/extensions/filetypes/unoidl/idlfile.png"; // NOI18N
+    
+    public ImplObjectDataNode(ImplObjectDataObject obj) {
+        super(obj, Children.LEAF);
+        setIconBaseWithExtension(IMAGE_ICON_BASE);
+    }
+    
+//    /** Creates a property sheet. */
+//    protected Sheet createSheet() {
+//        Sheet s = super.createSheet();
+//        Sheet.Set ss = s.get(Sheet.PROPERTIES);
+//        if (ss == null) {
+//            ss = Sheet.createPropertiesSet();
+//            s.put(ss);
+//        }
+//        // TODO add some relevant properties: ss.put(...)
+//        return s;
+//    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataObject.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataObject.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataObject.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDataObject.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: ImplObjectDataObject.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/08/15 13:45:23 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 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
+ *
+ ************************************************************************/
+package org.openoffice.extensions.filetypes.implobject;
+
+import java.io.IOException;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataObjectExistsException;
+import org.openide.loaders.MultiDataObject;
+import org.openide.nodes.CookieSet;
+import org.openide.nodes.Node;
+import org.openide.text.DataEditorSupport;
+
+public class ImplObjectDataObject extends MultiDataObject {
+    
+    public ImplObjectDataObject(FileObject pf, ImplObjectDataLoader loader) throws DataObjectExistsException, IOException {
+        super(pf, loader);
+        CookieSet cookies = getCookieSet();
+        cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies));
+    }
+    
+    protected Node createNodeDelegate() {
+        return new ImplObjectDataNode(this);
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription.html
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription.html?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription.html (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription.html Fri Jan 27 01:29:33 2012
@@ -0,0 +1,5 @@
+<html>
+    <body>
+    Create a Java implementation object of a service.
+    </body>
+</html>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription_ja.html
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription_ja.html?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription_ja.html (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription_ja.html Fri Jan 27 01:29:33 2012
@@ -0,0 +1,11 @@
+<html>
+    
+<head>
+<!-- Inserted by TRADOS: --><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=EUC-JP">
+</head>
+<body>
+    ¥µ¡¼¥Ó¥¹¤Î Java ¼ÂÁõ¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤·¤Þ¤¹¡£
+    </body>
+</html>
+
+

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription_pt_BR.html
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription_pt_BR.html?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription_pt_BR.html (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription_pt_BR.html Fri Jan 27 01:29:33 2012
@@ -0,0 +1,5 @@
+<html lang='pt'>
+    <body>
+    Cria uma implementação de objeto Java de um serviço.
+    </body>
+</html>



Mime
View raw message