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 [38/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/o...
Date Fri, 27 Jan 2012 01:29:58 GMT
Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/office/ReflectionWrapper.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/office/ReflectionWrapper.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/office/ReflectionWrapper.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/office/ReflectionWrapper.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: ReflectionWrapper.java,v $
+ *
+ *  $Revision: 1.6 $
+ *
+ *  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.util.office;
+
+import java.io.File;
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Vector;
+
+/**
+ *
+ */
+public class ReflectionWrapper {
+    ClassLoader classLoader;
+    
+    
+    protected ReflectionWrapper(Vector<File> repository) {
+        classLoader = JarClassLoader.getClassLoader(repository);
+    }
+    
+    public Class forName(String className) throws ClassNotFoundException {
+        return classLoader.loadClass(className);
+    }
+
+    public Object callConstructor(String className, Object[]param) 
+            throws ClassNotFoundException, NoSuchMethodException, 
+            InstantiationException, IllegalAccessException, InvocationTargetException {
+        Object constructedObject = null;
+        Class<?> newClass = classLoader.loadClass(className);
+        Class[]ctorParamTypes = getClassTypesFromParameters(param);
+        Constructor ctor = newClass.getConstructor(ctorParamTypes);
+        constructedObject = ctor.newInstance(param);
+        return constructedObject;
+    }
+    
+    public Object executeMethod(Object callObject, 
+            String methodName, Object[]param, Class[]paramTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+        Object methodResult = null;
+        Class<?> clazz = callObject.getClass();
+        Method method = clazz.getMethod(methodName, paramTypes);
+        methodResult = method.invoke(callObject, param);
+        return methodResult;
+    }
+
+    public Object executeMethod(Object callObject, 
+            String methodName, Object[]param) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+        Class[]paramTypes = getClassTypesFromParameters(param);
+        return executeMethod(callObject, methodName, param, paramTypes);
+    }
+
+    public boolean executeBooleanMethod(Object callObject, 
+            String methodName, Object[]param) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+        Object retValue = executeMethod(callObject, methodName, param);
+        return ((Boolean)retValue).booleanValue();
+    }
+    
+    public Object getArray(String className, 
+            int[] dimensions) throws ClassNotFoundException {
+        Object arrayObject = null;
+        arrayObject = Array.newInstance(classLoader.loadClass(className), dimensions);
+        return arrayObject;
+    }
+    
+    public void setArrayValue(Object arrayType, int index, Object value) {
+        Array.set(arrayType, index, value);
+    }
+
+    public Object getArrayValue(Object arrayType, int index) {
+        return Array.get(arrayType, index);
+    }
+
+    public Object executeStaticMethod(String className, 
+            String methodName, Object[]param) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+        Object methodResult = null;
+        Class<?> clazz = classLoader.loadClass(className);
+        Class[]methodParamTypes = getClassTypesFromParameters(param);
+        Method method = clazz.getMethod(methodName, methodParamTypes);
+        methodResult = method.invoke(clazz, param);
+        return methodResult;
+    }
+
+    public Object getPublicField(Object callObject, String fieldName) throws NoSuchFieldException, IllegalAccessException {
+        Object fieldResult = null;
+        Class clazz = callObject.getClass();
+        Field field = clazz.getDeclaredField(fieldName);
+        fieldResult = field.get(callObject);
+        return fieldResult;
+    }
+    
+    public Object getStaticField(String className, String fieldName) throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException {
+        Object fieldResult = null;
+        Class clazz = classLoader.loadClass(className);
+        Field field = clazz.getDeclaredField(fieldName);
+        fieldResult = field.get(null);
+        return fieldResult;
+    }
+    
+    private Class[] getClassTypesFromParameters(Object[] param) {
+        if (param == null) return new Class[0];
+        Class[]classParamTypes = new Class[param.length];
+        for (int i=0; i<param.length; i++) {
+            Class c = param[i].getClass();
+            // for proxy objects we take the object class
+            if (c.getName().indexOf("$Proxy") != -1) { // NOI18N
+                c = Object.class;
+            }
+            classParamTypes[i] = c;
+        }
+        return classParamTypes;
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,9 @@
+CTL_UnoIdlTypeBrowserAction=Uno Idl Type Browser
+CTL_UnoIdlTypeBrowserTopComponent=Uno Idl Type Browser Window
+HINT_UnoIdlTypeBrowserTopComponent=This is a UnoIdlTypeBrowser window
+CTL_NoView=<No View Available>
+HINT_Installation=Check your OpenOffice.org installation
+CTL_AddOffice=The Uno Idl type browser will only work with a valid\
+\nOpenOffice.org and OpenOffice.org SDK installation\
+\nSee Tools - Options - Miscellaneous - \
+\nOpenOffice.org Extensions
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_ja.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_ja.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_ja.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_ja.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,20 @@
+# CTL_UnoIdlTypeBrowserAction=Uno Idl Type Browser
+CTL_UnoIdlTypeBrowserAction=Uno Idl \u578b\u30d6\u30e9\u30a6\u30b6
+# CTL_UnoIdlTypeBrowserTopComponent=Uno Idl Type Browser Window
+CTL_UnoIdlTypeBrowserTopComponent=Uno Idl \u578b\u30d6\u30e9\u30a6\u30b6\u30a6\u30a3\u30f3\u30c9\u30a6
+# HINT_UnoIdlTypeBrowserTopComponent=This is a UnoIdlTypeBrowser window
+HINT_UnoIdlTypeBrowserTopComponent=\u3053\u308c\u306f UnoIdlTypeBrowser \u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u3059
+# CTL_NoView=<No View Available>
+CTL_NoView=<\u4f7f\u7528\u53ef\u80fd\u306a\u30d3\u30e5\u30fc\u306f\u3042\u308a\u307e\u305b\u3093>
+# HINT_Installation=Check your OpenOffice.org installation
+HINT_Installation=OpenOffice.org \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044
+# CTL_AddOffice=The Uno Idl type browser will only work with a valid\
+# \nOpenOffice.org and OpenOffice.org SDK installation\
+# \nSee Tools - Options - Miscellaneous - \
+# \nOpenOffice.org Extensions
+CTL_AddOffice=Uno Idl \u578b\u30d6\u30e9\u30a6\u30b6\u306f\u6709\u52b9\u306a OpenOffice.org \u304a\u3088\u3073\
+\ OpenOffice.org SDK \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u307f\u3067\u52d5\u4f5c\u3057\u307e\u3059\
+\n\u300c\u30c4\u30fc\u30eb\u300d>\u300c\u30aa\u30d7\u30b7\u30e7\u30f3\u300d>\u300c\u305d\u306e\u4ed6\u300d>\
+\n\u300cOpenOffice.org \u62e1\u5f35\u300d\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044
+
+

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_pt_BR.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_pt_BR.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_pt_BR.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_pt_BR.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,9 @@
+CTL_UnoIdlTypeBrowserAction=Uno Idl Type Browser
+CTL_UnoIdlTypeBrowserTopComponent=Uno Idl Type Browser Window
+HINT_UnoIdlTypeBrowserTopComponent=This is a UnoIdlTypeBrowser window
+CTL_NoView=<No View Available>
+HINT_Installation=Check your OpenOffice.org installation
+CTL_AddOffice=The Uno Idl type browser will only work with a valid\
+\nOpenOffice.org and OpenOffice.org SDK installation\
+\nSee Tools - Options - Miscellaneous - \
+\nOpenOffice.org Extensions
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_zh_CN.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_zh_CN.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_zh_CN.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/Bundle_zh_CN.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,6 @@
+CTL_UnoIdlTypeBrowserAction=Uno Idl \u7c7b\u578b\u6d4f\u89c8\u5668
+CTL_UnoIdlTypeBrowserTopComponent=Uno Idl \u7c7b\u578b\u6d4f\u89c8\u5668\u7a97\u53e3
+HINT_UnoIdlTypeBrowserTopComponent=\u8fd9\u662f\u4e00\u4e2a Uno Idl \u7c7b\u578b\u6d4f\u89c8\u5668\u7a97\u53e3
+CTL_NoView=<\u65e0\u53ef\u7528\u7684\u89c6\u56fe>
+HINT_Installation=\u8bf7\u68c0\u67e5 OpenOffice.org \u5b89\u88c5
+CTL_AddOffice=Uno Idl \u7c7b\u578b\u6d4f\u89c8\u5668\u53ea\u80fd\u4e0e\u6709\u6548\u7684\nOpenOffice.org \u548c OpenOffice.org SDK \u5b89\u88c5\u4e00\u8d77\u4f7f\u7528\n\u8bf7\u53c2\u89c1\u201c\u5de5\u5177\u201d>\u201c\u9009\u9879\u201d>\u201c\u6742\u9879\u201d>\n\u201cOpenOffice.org API \u63d2\u4ef6\u8bbe\u7f6e\u201d

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/TypeBrowserNotActiveJPanel.form
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/TypeBrowserNotActiveJPanel.form?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/TypeBrowserNotActiveJPanel.form (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/TypeBrowserNotActiveJPanel.form Fri Jan 27 01:29:33 2012
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <Properties>
+    <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+      <Color blue="ff" green="ff" red="ff" type="rgb"/>
+    </Property>
+  </Properties>
+  <AuxValues>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Component id="jScrollPane1" alignment="0" pref="164" max="32767" attributes="0"/>
+          <Component id="errorMessageTextField" alignment="0" pref="164" max="32767" attributes="0"/>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="1" attributes="0">
+              <Component id="errorMessageTextField" pref="14" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Component class="javax.swing.JTextField" name="errorMessageTextField">
+      <Properties>
+        <Property name="editable" type="boolean" value="false"/>
+        <Property name="horizontalAlignment" type="int" value="0"/>
+        <Property name="text" type="java.lang.String" value="jTextField1"/>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="null"/>
+        </Property>
+        <Property name="enabled" type="boolean" value="false"/>
+        <Property name="name" type="java.lang.String" value="errorMessageNoTypeBrowser"/>
+      </Properties>
+    </Component>
+    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+      <AuxValues>
+        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+      </AuxValues>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+      <SubComponents>
+        <Component class="javax.swing.JTextArea" name="errorTextArea">
+          <Properties>
+            <Property name="columns" type="int" value="20"/>
+            <Property name="editable" type="boolean" value="false"/>
+            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+              <Font name="Tahoma" size="11" style="0"/>
+            </Property>
+            <Property name="rows" type="int" value="4"/>
+            <Property name="text" type="java.lang.String" value="Hallo"/>
+            <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+              <Border info="null"/>
+            </Property>
+            <Property name="enabled" type="boolean" value="false"/>
+          </Properties>
+        </Component>
+      </SubComponents>
+    </Container>
+  </SubComponents>
+</Form>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/TypeBrowserNotActiveJPanel.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/TypeBrowserNotActiveJPanel.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/TypeBrowserNotActiveJPanel.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/TypeBrowserNotActiveJPanel.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: TypeBrowserNotActiveJPanel.java,v $
+ *
+ *  $Revision: 1.3 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/08/15 13:45:20 $
+ *
+ *  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.util.typebrowser;
+
+import java.util.StringTokenizer;
+
+/**
+ *
+ * @author  sg128468
+ */
+public class TypeBrowserNotActiveJPanel extends javax.swing.JPanel {
+    
+    /**
+     * Creates new form TypeBrowserNotActiveJPanel
+     */
+    public TypeBrowserNotActiveJPanel(String title, String toolTip, String description) {
+        initComponents();
+        
+        errorMessageTextField.setText(title);
+        errorMessageTextField.setToolTipText(toolTip);
+        errorTextArea.setText(description);
+    }
+    
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+    private void initComponents() {
+        errorMessageTextField = new javax.swing.JTextField();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        errorTextArea = new javax.swing.JTextArea();
+
+        setBackground(new java.awt.Color(255, 255, 255));
+        errorMessageTextField.setEditable(false);
+        errorMessageTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
+        errorMessageTextField.setText("jTextField1");
+        errorMessageTextField.setBorder(null);
+        errorMessageTextField.setEnabled(false);
+        errorMessageTextField.setName("errorMessageNoTypeBrowser");
+
+        errorTextArea.setColumns(20);
+        errorTextArea.setEditable(false);
+        errorTextArea.setFont(new java.awt.Font("Tahoma", 0, 11));
+        errorTextArea.setRows(4);
+        errorTextArea.setText("Hallo");
+        errorTextArea.setBorder(null);
+        errorTextArea.setEnabled(false);
+        jScrollPane1.setViewportView(errorTextArea);
+
+        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
+        this.setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
+            .add(errorMessageTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+                .add(errorMessageTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, Short.MAX_VALUE)
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+        );
+    }// </editor-fold>//GEN-END:initComponents
+    
+    
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JTextField errorMessageTextField;
+    private javax.swing.JTextArea errorTextArea;
+    private javax.swing.JScrollPane jScrollPane1;
+    // End of variables declaration//GEN-END:variables
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserAction.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserAction.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserAction.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserAction.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: UnoIdlTypeBrowserAction.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  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.util.typebrowser;
+
+import java.awt.event.ActionEvent;
+import javax.swing.AbstractAction;
+import javax.swing.ImageIcon;
+import org.openide.util.ImageUtilities;
+import org.openide.util.NbBundle;
+import org.openide.windows.TopComponent;
+
+/**
+ * Action which shows UnoIdlTypeBrowser component.
+ */
+public class UnoIdlTypeBrowserAction extends AbstractAction {
+    
+    public UnoIdlTypeBrowserAction() {
+        super(NbBundle.getMessage(UnoIdlTypeBrowserAction.class, "CTL_UnoIdlTypeBrowserAction"));
+        putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(UnoIdlTypeBrowserTopComponent.ICON_PATH, true)));
+    }
+    
+    public void actionPerformed(ActionEvent evt) {
+//          TopComponent win = FunctionEditor.findInstance();
+        TopComponent win = UnoIdlTypeBrowserTopComponent.findInstance();
+        win.open();
+        win.requestActive();
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponent.form
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponent.form?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponent.form (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponent.form Fri Jan 27 01:29:33 2012
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3">
+  <AuxValues>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <Component id="jScrollPane1" min="-2" pref="101" max="-2" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jScrollPane2" pref="293" max="32767" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Component id="jScrollPane1" alignment="0" pref="300" max="32767" attributes="0"/>
+          <Component id="jScrollPane2" alignment="0" pref="300" max="32767" attributes="0"/>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+      <AuxValues>
+        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+      </AuxValues>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+      <SubComponents>
+        <Component class="javax.swing.JTree" name="jTree1">
+        </Component>
+      </SubComponents>
+    </Container>
+    <Container class="javax.swing.JScrollPane" name="jScrollPane2">
+      <AuxValues>
+        <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new BeanTreeView();"/>
+      </AuxValues>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+    </Container>
+  </SubComponents>
+</Form>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponent.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponent.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponent.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponent.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: UnoIdlTypeBrowserTopComponent.java,v $
+ *
+ *  $Revision: 1.5 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/08/15 13:45:21 $
+ *
+ *  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.util.typebrowser;
+
+import java.awt.dnd.DropTarget;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.Serializable;
+import javax.swing.tree.TreeModel;
+import org.openide.ErrorManager;
+import org.openide.explorer.ExplorerManager;
+import org.openide.explorer.ExplorerUtils;
+import org.openide.explorer.view.BeanTreeView;
+import org.openide.windows.TopComponent;
+import org.openide.windows.WindowManager;
+
+/**
+ * Top component which displays something.
+ */
+final class UnoIdlTypeBrowserTopComponent extends TopComponent implements ExplorerManager.Provider, PropertyChangeListener {
+    
+    private static final long serialVersionUID = 1L;
+    private static UnoIdlTypeBrowserTopComponent instance;
+    /** path to the icon used by the component and its open action */
+    static final String ICON_PATH = "org/openoffice/extensions/util/typebrowser/idlfile.png"; // NOI18N
+    private static final String PREFERRED_ID = "UnoIdlTypeBrowserTopComponent"; // NOI18N
+    private transient ExplorerManager explorerManager = new ExplorerManager();
+    
+    /**
+     * panel to show if no type browser is available
+     */
+    javax.swing.JPanel noViewJPanel;
+    
+    private UnoIdlTypeBrowserTopComponent() {
+        initComponents();
+        
+//        associateLookup(ExplorerUtils.createLookup(explorerManager, getActionMap()));
+//        explorerManager.setRootContext(new MenuElementNode(
+//                UIElementType.createInitialUIStructure(), new UIElementChildren()));
+
+/*        setName(NbBundle.getMessage(UnoIdlTypeBrowserTopComponent.class, "CTL_UnoIdlTypeBrowserTopComponent"));
+        setToolTipText(NbBundle.getMessage(UnoIdlTypeBrowserTopComponent.class, "HINT_UnoIdlTypeBrowserTopComponent"));
+        setIcon(Utilities.loadImage(ICON_PATH, true));
+        noViewJPanel = new TypeBrowserNotActiveJPanel(
+            NbBundle.getMessage(UnoIdlTypeBrowserTopComponent.class, "CTL_NoView"), 
+            NbBundle.getMessage(UnoIdlTypeBrowserTopComponent.class, "HINT_Installation"),
+            NbBundle.getMessage(UnoIdlTypeBrowserTopComponent.class, "CTL_AddOffice")
+        );
+        setViewportView();
+        ConfigurationSettings settings = ConfigurationSettings.getSettings();
+        settings.registerPropertyChangeListener(settings.KEY_OFFICE_INSTALLATION, this); */
+    }
+    
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+    private void initComponents() {
+        jScrollPane1 = new javax.swing.JScrollPane();
+        jTree1 = new javax.swing.JTree();
+        jScrollPane2 = new BeanTreeView();
+
+        jScrollPane1.setViewportView(jTree1);
+
+        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
+        this.setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(layout.createSequentialGroup()
+                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 101, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 293, Short.MAX_VALUE))
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
+            .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
+        );
+    }// </editor-fold>//GEN-END:initComponents
+    
+    
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JScrollPane jScrollPane2;
+    private javax.swing.JTree jTree1;
+    // End of variables declaration//GEN-END:variables
+    
+    /**
+     * Gets default instance. Do not use directly: reserved for *.settings files only,
+     * i.e. deserialization routines; otherwise you could get a non-deserialized instance.
+     * To obtain the singleton instance, use {@link findInstance}.
+     */
+    public static synchronized UnoIdlTypeBrowserTopComponent getDefault() {
+        if (instance == null) {
+            instance = new UnoIdlTypeBrowserTopComponent();
+        }
+        return instance;
+    }
+    
+    /**
+     * Obtain the UnoIdlTypeBrowserTopComponent instance. Never call {@link #getDefault} directly!
+     */
+    public static synchronized UnoIdlTypeBrowserTopComponent findInstance() {
+        TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
+        if (win == null) {
+            ErrorManager.getDefault().log(ErrorManager.WARNING, 
+                "Cannot find UnoIdlTypeBrowser component. It will not be located properly in the window system."); // NOI18N
+            return getDefault();
+        }
+        if (win instanceof UnoIdlTypeBrowserTopComponent) {
+            return (UnoIdlTypeBrowserTopComponent)win;
+        }
+        ErrorManager.getDefault().log(ErrorManager.WARNING, 
+            "There seem to be multiple components with the '" + PREFERRED_ID + "' ID. That is a potential source of errors and unexpected behavior."); // NOI18N
+        return getDefault();
+    }
+    
+    public int getPersistenceType() {
+        return TopComponent.PERSISTENCE_ALWAYS;
+    }
+    
+    public void componentOpened() {
+        // TODO add custom code on component opening
+    }
+    
+    public void componentClosed() {
+        // TODO add custom code on component closing
+    }
+    
+    /** replaces this in object stream */
+    public Object writeReplace() {
+        return new ResolvableHelper();
+    }
+    
+    protected String preferredID() {
+        return PREFERRED_ID;
+    }
+
+    final static class ResolvableHelper implements Serializable {
+        private static final long serialVersionUID = 1L;
+        public Object readResolve() {
+            return UnoIdlTypeBrowserTopComponent.getDefault();
+        }
+    }
+    
+    private TreeModel getTreeModel() {
+        TreeModel model = null;
+//        try {
+//
+//            TypeBrowser tb = new TypeBrowser();//TypeBrowser.getTypeBrowserInstance();
+//            DefaultMutableTreeNode rootNode = tb.getAllTypeNodes();
+
+//            if (rootNode != null)
+//                model = new DefaultTreeModel(rootNode);
+//        }
+//        catch( Exception e) {
+//            e.printStackTrace(System.out);
+//        }
+        return model;
+    }
+
+    private void setViewportView() {
+        TreeModel model = getTreeModel();
+        if (model == null) {
+            jScrollPane1.setViewportView(noViewJPanel);
+        }
+        else {
+            jTree1.setModel(model);
+            jScrollPane1.setViewportView(jTree1);
+        }
+    }
+
+    public void propertyChange(PropertyChangeEvent evt) {
+//        setViewportView();
+    }
+
+    public ExplorerManager getExplorerManager() {
+        return explorerManager;
+    }
+
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponentSettings.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponentSettings.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponentSettings.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponentSettings.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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" spec="1.0"/>
+    <instanceof class="org.openide.windows.TopComponent"/>
+    <instanceof class="org.openoffice.extensions.util.typebrowser.UnoIdlTypeBrowserTopComponent"/>
+    <instance class="org.openoffice.extensions.util.typebrowser.UnoIdlTypeBrowserTopComponent" method="getDefault"/>
+</settings>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponentWstcref.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponentWstcref.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponentWstcref.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/UnoIdlTypeBrowserTopComponentWstcref.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE tc-ref PUBLIC "-//NetBeans//DTD Top Component in Mode Properties 2.0//EN" "http://www.netbeans.org/dtds/tc-ref2_0.dtd">
+<tc-ref version="2.0" >
+    <module name="org.openoffice.extensions" spec="1.0"/>
+    <tc-id id="UnoIdlTypeBrowserTopComponent"/>
+    <state opened="false"/>
+</tc-ref>

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

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

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/TypeBrowserChildren.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/TypeBrowserChildren.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/TypeBrowserChildren.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/TypeBrowserChildren.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: TypeBrowserChildren.java,v $
+ *
+ *  $Revision: 1.14 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/08/05 09:03:30 $
+ *
+ *  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.util.typebrowser.logic;
+
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.Vector;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.datamodel.PropertyContainer;
+import org.openoffice.extensions.util.datamodel.Service;
+import org.openoffice.extensions.util.datamodel.properties.UnknownOpenOfficeOrgPropertyException;
+import org.openoffice.extensions.util.office.ReflectionWrapper;
+
+/**
+ *
+ * @author sg128468
+ */
+public class TypeBrowserChildren extends Children.Keys<TypeBrowserChildren.TypeData> {
+
+    private ReflectionWrapper wrapper;
+    private Object xTDMgr;
+    
+    /** Creates a new instance of TypeBrowserChildren */
+    public TypeBrowserChildren(Object xTDMgr, ReflectionWrapper wrapper) {
+        this.wrapper = wrapper;
+        this.xTDMgr = xTDMgr;
+    }
+
+    /** Creates a new instance of TypeBrowserChildren */
+    public TypeBrowserChildren() {
+    }
+    
+    protected Node[] createNodes(TypeData newData) {
+        Node[] node = null;
+        String name = newData.getName();
+        int type = newData.getType();
+        if ((type & 127) == UnoTypes.MODULE_TYPE)
+            node = new Node[]{new TypeNode(name, type, new TypeBrowserChildren(xTDMgr, wrapper))};
+        else 
+            node = new Node[]{new TypeNode(name, type, Children.LEAF)};
+        return node;
+    }
+    
+    @Override
+    protected void addNotify() {
+        TypeNode node = (TypeNode)getNode();
+        String name = node.getHierarchicalName();
+        if (name.equals("root")) name = ""; // NOI18N
+
+        String[] types = TypeNode.getDisplayedTypes();
+        Vector<TypeData> newTypes = new Vector<TypeData>();
+
+        // primitive data types, if desired
+        if (TypeNode.displaysType(UnoTypes.SIMPLE) && name.length() == 0) {
+            for (int i=1; i<UnoTypes.SIMPLE_TYPE_TAGS.length; i++) {  // do not take void...
+                String newType = UnoTypes.SIMPLE_TYPE_TAGS[i];
+                newTypes.add(new TypeData(newType, UnoTypes.SIMPLE_TYPE));
+            }
+        }
+        // additional interfaces and services that were own designed 
+        NbNodeObject[] addNodes = TypeNode.getDesignedTypes();
+        if (addNodes != null) {
+            for (int i=0; i<addNodes.length; i++) {
+                if (name.length() == 0) { // first module under root
+                    int dataType = UnoTypes.MODULE_TYPE + UnoTypes.OWN_DESIGN_TYPE;
+                    if (isIntTypeInStringTypes(addNodes[i].getType(), types)) {
+                        String newType = null;
+                        try {
+                            newType = ((PropertyContainer)addNodes[i]).getSimpleProperty(Service.PROPERTY_CONTAINER_PACKAGE);
+                            int index = newType.indexOf('.');
+                            if (index > 0) {
+                                newType = newType.substring(0, index);
+                            }
+                            TypeData d = new TypeData(newType, dataType);
+                            if (!contains(newTypes, d)) {
+                                newTypes.add(d);
+                            }
+                        } catch (UnknownOpenOfficeOrgPropertyException ex) {
+                            LogWriter.getLogWriter().printStackTrace(ex);
+                        }
+                    }
+                }
+                else {
+                    if (isIntTypeInStringTypes(addNodes[i].getType(), types)) {
+                        String newType = null;
+                        try {
+                            newType = ((PropertyContainer)addNodes[i]).getSimpleProperty(Service.PROPERTY_CONTAINER_PACKAGE);
+                            if (newType.startsWith(name)) {
+                                int newLength = name.length() + 1;
+                                int nextDotIndex = -2;
+                                if (newLength <= newType.length()) {  // this mens we have the complete paackage added
+                                    nextDotIndex = newType.indexOf('.', newLength);
+                                }
+                                int dataType = UnoTypes.MODULE_TYPE + UnoTypes.OWN_DESIGN_TYPE;
+                                if (nextDotIndex == -2) { // complete package is there: add srvice/ifc name now
+                                    String simpleName = ((PropertyContainer)addNodes[i]).getSimpleProperty(Service.PROPERTY_CONTAINER_NAME);
+                                    if (newType.indexOf(simpleName) == -1) {
+                                        newType = newType.concat(".").concat(simpleName); // NOI18N
+                                        int nodesType = addNodes[i].getType();
+                                        if (nodesType == NbNodeObject.SERVICE_TYPE) {
+                                            dataType = UnoTypes.SERVICE_TYPE + UnoTypes.OWN_DESIGN_TYPE;
+                                        }
+                                        else if (nodesType == NbNodeObject.INTERFACE_TYPE) {
+                                            dataType = UnoTypes.INTERFACE_TYPE + UnoTypes.OWN_DESIGN_TYPE;
+                                        }
+                                        else if (nodesType == NbNodeObject.STRUCT_TYPE) {
+                                            dataType = UnoTypes.STRUCT_TYPE + UnoTypes.OWN_DESIGN_TYPE;
+                                        }
+                                        else if (nodesType == NbNodeObject.POLY_STRUCT_TYPE) {
+                                            dataType = UnoTypes.POLY_STRUCT_TYPE + UnoTypes.OWN_DESIGN_TYPE;
+                                        }
+                                        else if (nodesType == NbNodeObject.EXCEPTION_TYPE) {
+                                            dataType = UnoTypes.EXCEPTION_TYPE + UnoTypes.OWN_DESIGN_TYPE;
+                                        }
+                                    }
+                                }
+                                else if (nextDotIndex != -1) {  
+                                    newType = newType.substring(0, nextDotIndex);
+                                }  // else: keep the complete package name
+                                TypeData d = new TypeData(newType, dataType);
+                                if (!contains(newTypes, d)) {
+                                    newTypes.add(d);
+                                }
+                            }
+                        } catch (UnknownOpenOfficeOrgPropertyException ex) {
+                            LogWriter.getLogWriter().printStackTrace(ex);
+                        }
+                    }
+                }
+            }
+        }
+        // types from the Office
+        try {
+            types = TypeNode.getDisplayedOfficeTypes();
+            if (types != null) {
+                Object typeClassArray = wrapper.getArray(
+                            "com.sun.star.uno.TypeClass", new int[]{types.length}); // NOI18N
+                for (int i=0; i<types.length; i++) {
+                    wrapper.setArrayValue(
+                            typeClassArray, i, wrapper.getStaticField("com.sun.star.uno.TypeClass", types[i])); // NOI18N
+                }
+
+                Object tdSearchDepth = wrapper.getStaticField(
+                        "com.sun.star.reflection.TypeDescriptionSearchDepth", "ONE"); // NOI18N
+                // XTypeDescriptionEnumeration
+                Object xTDEnumeration = wrapper.executeMethod(
+                        xTDMgr, "createTypeDescriptionEnumeration",  // NOI18N
+                        new Object[]{name, typeClassArray, tdSearchDepth});
+
+                while ( wrapper.executeBooleanMethod(
+                                xTDEnumeration, "hasMoreElements", null) ) { // NOI18N
+                    Object xTD = wrapper.executeMethod(xTDEnumeration, "nextTypeDescription", null); // NOI18N
+                    Object typeClass = wrapper.executeMethod(xTD, "getTypeClass", null);  // NOI18N
+
+                    int dataType = UnoTypes.MODULE_TYPE;
+                    if (typeClass == wrapper.getStaticField("com.sun.star.uno.TypeClass", UnoTypes.SERVICE)) { // NOI18N
+                        dataType = UnoTypes.SERVICE_TYPE;
+                    }
+                    if (typeClass == wrapper.getStaticField("com.sun.star.uno.TypeClass", UnoTypes.INTERFACE)) { // NOI18N
+                        dataType = UnoTypes.INTERFACE_TYPE;
+                    }
+                    if (typeClass == wrapper.getStaticField("com.sun.star.uno.TypeClass", UnoTypes.EXCEPTION)) { // NOI18N
+                        dataType = UnoTypes.EXCEPTION_TYPE;
+                    }
+                    if (typeClass == wrapper.getStaticField("com.sun.star.uno.TypeClass", UnoTypes.STRUCT)) { // NOI18N
+                        dataType = UnoTypes.STRUCT_TYPE;
+                    } // 2do: poly struct?
+
+                    String newType = (String)wrapper.executeMethod(xTD, "getName", null); // NOI18N
+                    TypeData d = new TypeData(newType, dataType);
+                    if (!contains(newTypes, d)) {
+                        newTypes.add(d);
+                    }
+                }
+            }
+            TypeData[] typeObjects = newTypes.toArray(new TypeData[newTypes.size()]);
+            Arrays.sort(typeObjects, new Comparator<TypeData>() {
+                public int compare(TypeData o1, TypeData o2) {
+                    boolean o1isModule = (o1.getType() & 127) == UnoTypes.MODULE_TYPE;
+                    boolean o2isModule = (o2.getType() & 127) == UnoTypes.MODULE_TYPE;
+                    if ((o1isModule && o2isModule) || 
+                            (!o1isModule && !o2isModule)) {
+                        return o1.getName().compareTo(o2.getName());
+                    }
+                    else {
+                        // keep simple types as first position
+                        if (o1isModule || (o1.getType() & 127) == UnoTypes.SIMPLE_TYPE) return -1;
+                        if (o2isModule || (o2.getType() & 127) == UnoTypes.SIMPLE_TYPE) return 1;
+                    }
+                    return 0;
+                }
+            });
+            setKeys(typeObjects);
+        }
+        catch (Exception e) {
+            LogWriter.getLogWriter().printStackTrace(e);
+            // just do not set keys!
+        }
+    }
+    
+    @Override
+    protected void removeNotify() {
+        setKeys(new TypeData[]{});
+    }
+    
+    public void update() {
+        addNotify();
+    }
+
+    private boolean isIntTypeInStringTypes(int type, String[] types) {
+        for (int i=0; i<types.length; i++) {
+            switch (type) {
+                case NbNodeObject.INTERFACE_TYPE:
+                    if (types[i].equals(UnoTypes.INTERFACE)) return true;
+                    break;
+                case NbNodeObject.SERVICE_TYPE:
+                    if (types[i].equals(UnoTypes.SERVICE)) return true;
+                    break;
+                case NbNodeObject.STRUCT_TYPE:
+                    if (types[i].equals(UnoTypes.STRUCT)) return true;
+                    break;
+                case NbNodeObject.POLY_STRUCT_TYPE:
+                    if (types[i].equals(UnoTypes.STRUCT)) return true;
+                    break;
+                case NbNodeObject.EXCEPTION_TYPE:
+                    if (types[i].equals(UnoTypes.EXCEPTION)) return true;
+                    break;
+            }
+        }
+        return false;
+    }
+    
+    private boolean contains(Vector<TypeData> v, TypeData d) {
+        Enumeration<TypeData> e = v.elements();
+        int type1 = d.getType() & 127;
+        while(e.hasMoreElements()) {
+            TypeData comp = e.nextElement();
+            int type2 = comp.getType() & 127;
+            if (d.getName().equals(comp.getName())
+                && type1 == type2 
+                &&  type1 == UnoTypes.MODULE_TYPE) {
+                return true;
+            }
+        }
+        return false;
+    }
+    
+    public class TypeData {
+        int t;
+        String n;
+        public TypeData(String name, int type) {
+            n = name;
+            t = type;
+        }
+        public int    getType() { return t; }
+        public String getName() { return n; }
+    }
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/TypeNode.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/TypeNode.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/TypeNode.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/TypeNode.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,206 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: TypeNode.java,v $
+ *
+ *  $Revision: 1.7 $
+ *
+ *  last change: $Author: sg $ $Date: 2009/07/10 08:32: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.util.typebrowser.logic;
+
+import java.awt.Image;
+import java.util.Vector;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.util.ImageUtilities;
+import org.openoffice.extensions.util.datamodel.NbNodeObject;
+import org.openoffice.extensions.util.office.OfficeConnection;
+import org.openoffice.extensions.util.office.ReflectionWrapper;
+
+public class TypeNode extends AbstractNode {
+    
+    public static final String ERROR_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/moduleerror.png"; // NOI18N
+    public static final String MODULE_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/module.png"; // NOI18N
+    public static final String INTERFACE_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/interface.png"; // NOI18N
+    public static final String SERVICE_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/service.png"; // NOI18N
+    public static final String EXCEPTION_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/exception.png"; // NOI18N
+    public static final String STRUCT_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/struct.png"; // NOI18N
+    public static final String POLY_STRUCT_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/struct.png"; // NOI18N
+    public static final String CONSTANTS_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/enum.png"; // NOI18N
+    public static final String ENUM_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/enum.png"; // NOI18N
+    public static final String FOLDER_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/folder.png"; // NOI18N
+    public static final String OPEN_FOLDER_ICON = 
+            "org/openoffice/extensions/projecttemplates/component/icons/folderopen.png"; // NOI18N
+    
+    private static String[] displayedTypes = new String[]{
+        UnoTypes.MODULE, UnoTypes.SERVICE, UnoTypes.INTERFACE
+    };
+
+    private static NbNodeObject[] addNodes;  // custom stuff from project, not office
+    
+    private String hierarchicalName;
+    private String iconPath;
+    // denotes that the node displays a type not from the office but self created
+    private boolean ownDesign;
+    private int type;
+    
+    protected TypeNode(String typeName, int type, Children children) {
+        super(children);
+        hierarchicalName = typeName;
+        this.type = type & 127;
+        ownDesign = (type >= UnoTypes.OWN_DESIGN_TYPE);
+        this.iconPath = getIconPathFromType(this.type);
+    }
+
+    public String getDisplayName() {
+        // when with '.' only use name from then on
+        if (hierarchicalName.indexOf('.') != -1)
+            return hierarchicalName.substring(hierarchicalName.lastIndexOf('.') + 1);
+        return hierarchicalName;
+    }
+
+    public String getHierarchicalName() {
+        return hierarchicalName;
+    }
+    
+    public Image getIcon(int type) {
+       return ImageUtilities.loadImage(iconPath);
+    }
+    
+    public Image getOpenedIcon (int type) {
+        return getIcon(type);
+    }
+    
+    public static void setDisplayedTypes(String[] types) {
+        Vector<String> v = new Vector<String>();
+        for (int i=0; i<types.length; i++) {
+            v.add(types[i]);
+        }
+        if (!v.contains(UnoTypes.MODULE)) {
+            v.add(UnoTypes.MODULE);
+        }
+        displayedTypes = v.toArray(new String[v.size()]);
+    }
+    
+    public static String[] getDisplayedTypes() {
+        return displayedTypes;
+    }
+    
+    public static String[] getDisplayedOfficeTypes() {
+        Vector<String>v = new Vector<String>();
+        for (int i=0; i<displayedTypes.length; i++) {
+            if (!displayedTypes[i].equals(UnoTypes.SIMPLE)) {
+                v.add(displayedTypes[i]);
+            }
+        }
+        return v.toArray(new String[v.size()]);
+    }
+    
+    public static boolean displaysType(String type) {
+        for (int i=0; i<displayedTypes.length; i++) {
+            if (type.equals(displayedTypes[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+    
+    public int getNodeType () {
+        return type;
+    }
+    
+    public boolean isOwnDesign() {
+        return ownDesign;
+    }
+    
+    private String getIconPathFromType(int type) {
+        switch (type) {
+            case UnoTypes.ERROR_TYPE:
+                return ERROR_ICON;
+            case UnoTypes.SERVICE_TYPE:
+                return SERVICE_ICON;
+            case UnoTypes.INTERFACE_TYPE:
+                return INTERFACE_ICON;
+            case UnoTypes.MODULE_TYPE:
+                return MODULE_ICON;
+            case UnoTypes.EXCEPTION_TYPE:
+                return EXCEPTION_ICON;
+            case UnoTypes.CONSTANTS_TYPE:
+                return CONSTANTS_ICON;
+            case UnoTypes.STRUCT_TYPE:
+                return STRUCT_ICON;
+            case UnoTypes.POLY_STRUCT_TYPE:
+                return POLY_STRUCT_ICON;
+            case UnoTypes.ENUM_TYPE:
+                return ENUM_ICON;
+            default:
+                return SERVICE_ICON;
+        }
+    }
+    
+    public static TypeNode createRootNode(String[] types) {
+        if (types == null || types.length == 0) {
+            types = displayedTypes; // standard as fallback
+        }
+        setDisplayedTypes(types);
+        Object xTDMgr = null;
+        Object xCtx = OfficeConnection.getComponentContext();
+        ReflectionWrapper wrapper = OfficeConnection.getReflectionWrapper();
+        try {
+            Object o = wrapper.executeMethod(xCtx, 
+                    "getValueByName", new Object[]{
+                    "/singletons/com.sun.star.reflection.theTypeDescriptionManager"}); // NOI18N
+            Class classType = wrapper.forName("com.sun.star.reflection.XTypeDescriptionEnumerationAccess"); // NOI18N
+            xTDMgr = wrapper.executeStaticMethod("com.sun.star.uno.AnyConverter", "toObject", new Object[]{classType, o}); // NOI18N
+        }
+        catch (java.lang.Exception e) {
+            return new TypeNode("<No Types Available>", UnoTypes.ERROR_TYPE, new TypeBrowserChildren()); // NOI18N
+        }
+        return new TypeNode("root", UnoTypes.MODULE_TYPE, new TypeBrowserChildren(xTDMgr, wrapper)); // NOI18N
+    }
+    
+    public static void setDesignedTypes(NbNodeObject[] aNodes) {
+        addNodes = aNodes;
+    }
+    public static NbNodeObject[] getDesignedTypes() {
+        return addNodes;
+    }
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/UnoTypes.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/UnoTypes.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/UnoTypes.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/util/typebrowser/logic/UnoTypes.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: UnoTypes.java,v $
+ *
+ *  $Revision: 1.1 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/07/03 08:32: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.util.typebrowser.logic;
+
+/**
+ * Just a container to hold some static names.
+ */
+// TODO: rename and make an interface?
+public interface UnoTypes {
+    
+    public static final String[] SIMPLE_TYPE_TAGS = new String[] {
+        "void", "boolean", "byte", "char", "short", "int", 
+        "long", "float", "double", "String", "Object"
+    }; // NOI18N
+
+    public static final int SIMPLE_TYPE = 0;
+    public static final int ANY_TYPE = 1;
+    public static final int ENUM_TYPE = 2;
+    public static final int STRUCT_TYPE = 3;
+    public static final int EXCEPTION_TYPE = 4;
+    public static final int INTERFACE_TYPE = 5;
+    public static final int SERVICE_TYPE = 6;
+    public static final int MODULE_TYPE = 7;
+    public static final int CONSTANTS_TYPE = 8;
+    public static final int SINGLETON_TYPE = 9;
+    public static final int ERROR_TYPE = 10;
+    public static final int POLY_STRUCT_TYPE = 11;
+    public static final int OWN_DESIGN_TYPE = 128;
+    
+    /** reflecting a simple type: this is no UNO type!!
+    */
+	public static final String SIMPLE = "simple"; // NOI18N
+    /** reflecting the any type; anys can carry any UNO value except of any values
+    */
+	public static final String ANY = "ANY"; // NOI18N
+    /** reflecting enum types
+    */
+	public static final String ENUM = "ENUM"; // NOI18N
+    /** reflecting compound types
+    */
+	public static final String STRUCT = "STRUCT"; // NOI18N
+    /** reflecting exception types
+    */
+	public static final String EXCEPTION = "EXCEPTION"; // NOI18N
+    /** reflecting interface types
+    */
+	public static final String INTERFACE = "INTERFACE"; // NOI18N
+    /** reflecting services
+    */
+	public static final String SERVICE = "SERVICE"; // NOI18N
+    /** reflecting modules
+    */
+	public static final String MODULE = "MODULE"; // NOI18N
+    /** reflecting constants groups
+    */
+    public static final String CONSTANTS = "CONSTANTS"; // NOI18N
+    /** reflecting singletons
+    */
+    public static final String SINGLETON = "SINGLETON"; // NOI18N
+    
+}

Added: incubator/ooo/devtools/netbeansintegration/test/build-qa-functional.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/build-qa-functional.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/build-qa-functional.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/test/build-qa-functional.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!--
+The contents of this file are subject to the terms of the Common Development
+and Distribution License (the License). You may not use this file except in
+compliance with the License.
+
+You can obtain a copy of the License at http://www.netbeans.org/cddl.html
+or http://www.netbeans.org/cddl.txt.
+
+When distributing Covered Code, include this CDDL Header Notice in each file
+and include the License file at http://www.netbeans.org/cddl.txt.
+If applicable, add the following below the CDDL Header, with the fields
+enclosed by brackets [] replaced by your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+The Original Software is NetBeans. The Initial Developer of the Original
+Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
+Microsystems, Inc. All Rights Reserved.
+-->
+<project name="org.openoffice.extensions/test-qa-functional" basedir="." default="all">
+
+    <!-- Imports default qa-functional-compiler and runidetest executor.
+        jemmy and jellytools jars are on classpath for both. -->
+    <import file="${xtest.home}/lib/templates/xtest-qa-functional.xml"/>
+
+    <!-- ========= -->
+    <!-- Compilers -->
+    <!-- ========= -->
+
+    <!-- You can override default qa-functional-compiler if you need something special -->
+         <!--
+    <target name="qa-functional-compiler" depends="init-cp">
+        <buildTests srcdir="qa-functional/src" compileexcludes="**/data/**">
+            <classpath refid="test.qa-functional.compile.cp"/>
+        </buildTests>
+    </target>
+    -->
+    
+    <!-- ========= -->
+    <!-- Executors -->
+    <!-- ========= -->
+    
+    <!-- This target executes tests inside IDE. It is defined in default-build-qa-functional.xml.
+         If you need to customize it, you can uncomment the following and override it.
+    <target name="runidetest" depends="init-cp">
+        <executeTests pluginname="ide">
+            <classpath refid="test.qa-functional.run.cp"/>
+        </executeTests>
+    </target>
+    -->
+</project>
+

Added: incubator/ooo/devtools/netbeansintegration/test/build-unit.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/build-unit.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/build-unit.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/test/build-unit.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+The contents of this file are subject to the terms of the Common Development
+and Distribution License (the License). You may not use this file except in
+compliance with the License.
+
+You can obtain a copy of the License at http://www.netbeans.org/cddl.html
+or http://www.netbeans.org/cddl.txt.
+
+When distributing Covered Code, include this CDDL Header Notice in each file
+and include the License file at http://www.netbeans.org/cddl.txt.
+If applicable, add the following below the CDDL Header, with the fields
+enclosed by brackets [] replaced by your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+The Original Software is NetBeans. The Initial Developer of the Original
+Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
+Microsystems, Inc. All Rights Reserved.
+-->
+<project name="org.openoffice.extensions/test-unit" basedir="." default="all">
+
+    <!-- Imports default-compiler, run-unit-test targets referenced from cfg-unit.xml. -->
+    <import file="${xtest.home}/lib/templates/xtest-unit.xml"/>
+</project>
+

Added: incubator/ooo/devtools/netbeansintegration/test/build.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/build.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/build.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/test/build.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!--
+The contents of this file are subject to the terms of the Common Development
+and Distribution License (the License). You may not use this file except in
+compliance with the License.
+
+You can obtain a copy of the License at http://www.netbeans.org/cddl.html
+or http://www.netbeans.org/cddl.txt.
+
+When distributing Covered Code, include this CDDL Header Notice in each file
+and include the License file at http://www.netbeans.org/cddl.txt.
+If applicable, add the following below the CDDL Header, with the fields
+enclosed by brackets [] replaced by your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+The Original Software is NetBeans. The Initial Developer of the Original
+Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
+Microsystems, Inc. All Rights Reserved.
+-->
+<project name="org.openoffice.extensions/test" basedir="." default="all">
+
+    <!-- Name of tested module -->
+    <property name="xtest.module" value="org.openoffice.extensions"/>
+
+    <!-- Home of XTest -->
+    <property name="xtest.home" location="/export/home/sg128468/nb/netbeans-6.1/testtools/xtest-distribution"/>
+
+    <!-- Imports buildtests, cleantests, runtest, cleanresults, realclean, printconfig targets. -->
+    <import file="${xtest.home}/lib/templates/xtest.xml"/>
+
+    <!-- default testtypes, attributes used when no value is supplied from command line -->
+<!--    <property name="xtest.testtype" value="unit"/>
+    <property name="xtest.attribs" value="stable"/> -->
+    <property name="xtest.testtype" value="qa-functional"/>
+    <property name="xtest.attribs" value="stable,validation"/>
+
+    <!-- Points to your NetBeans user directory. Optional for IDE tests.  -->
+    <property name="netbeans.user" location="/export/home/sg128468/.netbeans/6.1_local"/>
+</project>
+

Added: incubator/ooo/devtools/netbeansintegration/test/cfg-qa-functional.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/cfg-qa-functional.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/cfg-qa-functional.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/test/cfg-qa-functional.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+The contents of this file are subject to the terms of the Common Development
+and Distribution License (the License). You may not use this file except in
+compliance with the License.
+
+You can obtain a copy of the License at http://www.netbeans.org/cddl.html
+or http://www.netbeans.org/cddl.txt.
+
+When distributing Covered Code, include this CDDL Header Notice in each file
+and include the License file at http://www.netbeans.org/cddl.txt.
+If applicable, add the following below the CDDL Header, with the fields
+enclosed by brackets [] replaced by your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+The Original Software is NetBeans. The Initial Developer of the Original
+Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
+Microsystems, Inc. All Rights Reserved.
+-->
+<!-- Configation file to group tests into testbags. For details see
+     http://xtest.netbeans.org/xtest_config.html.
+-->
+<mconfig name="qa-functional config">
+
+    <testbag testattribs="validation,stable" executor="ide" name="qa-functional tests">
+        <testset dir="qa-functional/src">
+            <patternset>
+                <include name="**/*Test.class"/>
+            </patternset>
+        </testset>
+    </testbag>
+
+    <compiler name="qa-functional-compiler" antfile="build-qa-functional.xml"
+              target="qa-functional-compiler" default="true"/>
+    <executor name="ide" antfile="build-qa-functional.xml" target="runidetest" default="true"/>
+</mconfig>

Added: incubator/ooo/devtools/netbeansintegration/test/cfg-unit.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/test/cfg-unit.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/test/cfg-unit.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/test/cfg-unit.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+The contents of this file are subject to the terms of the Common Development
+and Distribution License (the License). You may not use this file except in
+compliance with the License.
+
+You can obtain a copy of the License at http://www.netbeans.org/cddl.html
+or http://www.netbeans.org/cddl.txt.
+
+When distributing Covered Code, include this CDDL Header Notice in each file
+and include the License file at http://www.netbeans.org/cddl.txt.
+If applicable, add the following below the CDDL Header, with the fields
+enclosed by brackets [] replaced by your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+The Original Software is NetBeans. The Initial Developer of the Original
+Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
+Microsystems, Inc. All Rights Reserved.
+-->
+<!-- Configation file to group tests into testbags. For details see
+     http://xtest.netbeans.org/xtest_config.html
+-->
+<mconfig name="Unit config">
+
+    <testbag testattribs="stable" executor="unit-executor" name="unit tests">
+        <testset dir="unit/src">
+            <patternset>
+                <include name="**/*Test.class"/>
+                <exclude name="**/PolyStructTest.class"/>
+                <exclude name="**/ParameterTest.class"/>
+                <exclude name="**/PropertyContainerTest.class"/>
+                <exclude name="**/ServiceTest.class"/>
+                <exclude name="**/StructTest.class"/>
+                <exclude name="**/TemplateTypeTest.class"/>
+            </patternset>
+        </testset>
+    </testbag>
+
+    <compiler name="default-compiler" antfile="build-unit.xml" target="default-compiler" default="true"/>
+    <executor name="unit-executor" antfile="build-unit.xml" target="run-unit-test" default="true"/>
+</mconfig>



Mime
View raw message