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 [13/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/layer.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/layer.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/layer.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/layer.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,429 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
+<filesystem>
+<!--    <attr name="SpringFramework\Templates\index.jsp\Content-Encoding" stringvalue="ISO-8859-1"/>
+    <attr name="Templates\JSF\Page.jsp\Content-Encoding" stringvalue="ISO-8859-1"/>
+    <attr name="Templates\JSF\PageFragment.jspf\Content-Encoding" stringvalue="ISO-8859-1"/>
+    <attr name="Templates\JSP_Servlet\JSP.jsp\Content-Encoding" stringvalue="${encoding}"/>
+    <attr name="Templates\JSP_Servlet\JSPF.jspf\Content-Encoding" stringvalue="${encoding}"/>
+    <attr name="Templates\JSP_Servlet\JSPFX.jspf\Content-Encoding" stringvalue="ISO-8859-1"/>
+    <attr name="Templates\JSP_Servlet\JSPX.jspx\Content-Encoding" stringvalue="${encoding}"/>
+    <attr name="Templates\JSP_Servlet\TagFile.tag\Content-Encoding" stringvalue="ISO-8859-1"/>
+    <attr name="Templates\JSP_Servlet\TagFileF.tagf\Content-Encoding" stringvalue="ISO-8859-1"/>
+    <attr name="Templates\JSP_Servlet\TagFileFX.tagf\Content-Encoding" stringvalue="ISO-8859-1"/>
+    <attr name="Templates\JSP_Servlet\TagFileX.tagx\Content-Encoding" stringvalue="${encoding}"/>
+    <attr name="Templates\WebServices\JmakiTemplates.jsp\Content-Encoding" stringvalue="ISO-8859-1"/>
+    <attr name="Templates\WebServices\JmakiTestResourcesTable.jsp\Content-Encoding" stringvalue="UTF-8"/>
+    <attr name="org-netbeans-modules-web-jsf\welcomeJSF.jsp\Content-Encoding" stringvalue="__ENCODING__"/>
+    <attr name="org-netbeans-modules-web-struts\welcome.jsp\Content-Encoding" stringvalue="__ENCODING__"/> -->
+    <folder name="OptionsDialog">
+        <folder name="Advanced">
+            <file name="org-openoffice-extensions-config-ConfigurationAdvancedOption.instance"/>
+        </folder>
+        <folder name="PreviewExamples">
+            <folder name="text">
+                <file name="x-uno-idl" url="editors/unoidl/resources/IdlExample"/>
+            </folder>
+        </folder>        
+    </folder>
+    <folder name="Templates">
+<!--        <folder name="OpenOfficeorg">
+            <file name="registry">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.Bundle"/>
+                <attr name="instantiatingIterator" newvalue="org.openoffice.extensions.filetypes.registry_ui.RegistryWizardIterator"/>
+                <attr name="template" boolvalue="true"/>
+                <attr name="templateWizardURL" urlvalue="nbresloc:/org/openoffice/extensions/filetypes/registry_ui/registry.html"/>
+            </file>
+        </folder> -->
+        <folder name="Project">
+            <folder name="org-openoffice-extensions">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.Bundle"/>
+                
+                <file name="UNOClientAppProject" url="projecttemplates/unoclientapplication/UNOClientAppProject.zip">
+                    <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.projecttemplates.unoclientapplication.Bundle"/>
+                    <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/openoffice/extensions/projecttemplates/unoclientapplication/unoclient.gif"/>
+                    <attr name="instantiatingIterator" methodvalue="org.openoffice.extensions.projecttemplates.unoclientapplication.UNOClientAppWizardIterator.createIterator"/>
+                    <attr name="instantiatingWizardURL" urlvalue="nbresloc:/org/openoffice/extensions/projecttemplates/unoclientapplication/UNOClientAppDescription.html"/>
+                    <attr name="template" boolvalue="true"/>
+                </file>
+                <file name="AddinProject" url="projecttemplates/calcaddin/AddinProject.zip">
+                    <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.projecttemplates.calcaddin.Bundle"/>
+                    <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/openoffice/extensions/projecttemplates/calcaddin/calcaddin.gif"/>
+                    <attr name="instantiatingIterator" methodvalue="org.openoffice.extensions.projecttemplates.calcaddin.AddinWizardIterator.createIterator"/>
+                    <attr name="instantiatingWizardURL" urlvalue="nbresloc:/org/openoffice/extensions/projecttemplates/calcaddin/AddinDescription.html"/>
+                    <attr name="template" boolvalue="true"/>
+                </file>
+                <file name="ComponentProject" url="projecttemplates/component/ComponentProject.zip">
+                    <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.projecttemplates.component.Bundle"/>
+                    <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/openoffice/extensions/projecttemplates/calcaddin/calcaddin.gif"/>
+                    <attr name="instantiatingIterator" methodvalue="org.openoffice.extensions.projecttemplates.component.ComponentWizardIterator.createIterator"/>
+                    <attr name="instantiatingWizardURL" urlvalue="nbresloc:/org/openoffice/extensions/projecttemplates/component/ComponentDescription.html"/>
+                    <attr name="template" boolvalue="true"/>
+                </file>
+                <file name="AddOnProject" url="projecttemplates/addon/AddOnProject.zip">
+                    <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.projecttemplates.addon.Bundle"/>
+                    <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/openoffice/extensions/projecttemplates/calcaddin/calcaddin.gif"/>
+                    <attr name="instantiatingIterator" methodvalue="org.openoffice.extensions.projecttemplates.addon.AddOnWizardIterator.createIterator"/>
+                    <attr name="instantiatingWizardURL" urlvalue="nbresloc:/org/openoffice/extensions/projecttemplates/addon/AddOnDescription.html"/>
+                    <attr name="template" boolvalue="true"/>
+                </file>
+            </folder>         
+        </folder>
+        <folder name="org-openoffice-extensions">
+            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.Bundle"/>
+            <!-- idl file wizard -->
+            <file name="idl">
+                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/openoffice/extensions/filetypes/unoidl/idlfile.png"/>
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.filetypes.unoidl.Bundle"/>
+                <attr name="instantiatingIterator" newvalue="org.openoffice.extensions.filetypes.unoidl.IdlWizardIterator"/>
+                <attr name="templateWizardURL" urlvalue="nbresloc:/org/openoffice/extensions/filetypes/unoidl/UnoIdlDescription.html"/>
+                <attr name="template" boolvalue="true"/>
+            </file>
+            <!-- xcu file template -->
+            <file name="XcuTemplate.xcu" url="filetypes/xcu/XcuTemplate.xcu">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.filetypes.xcu.Bundle"/>
+                <attr name="instantiatingIterator" newvalue="org.openoffice.extensions.filetypes.registry_ui.XcuWizardIterator"/>
+                <attr name="templateWizardURL" urlvalue="nbresloc:/org/openoffice/extensions/filetypes/xcu/XcuDescription.html"/>
+                <attr name="template" boolvalue="true"/>
+            </file>
+            <!-- xcs file template -->
+            <file name="XcsTemplate.xcs" url="filetypes/xcs/XcsTemplate.xcs">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.filetypes.xcs.Bundle"/>
+                <attr name="instantiatingIterator" newvalue="org.openoffice.extensions.filetypes.registry_ui.XcsWizardIterator"/>
+                <attr name="templateWizardURL" urlvalue="nbresloc:/org/openoffice/extensions/filetypes/xcs/XcsDescription.html"/>
+                <attr name="template" boolvalue="true"/>
+            </file>
+            <!-- java implementation object -->
+            <file name="ImplObjectTemplate.java" url="filetypes/implobject/ImplObjectTemplate.java">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.filetypes.implobject.Bundle"/>
+                <attr name="instantiatingIterator" newvalue="org.openoffice.extensions.filetypes.implobject.ImplObjectIterator"/>
+                <attr name="templateWizardURL" urlvalue="nbresloc:/org/openoffice/extensions/filetypes/implobject/ImplObjectDescription.html"/>
+                <attr name="template" boolvalue="true"/>
+            </file>
+        </folder>
+    </folder>
+    
+    <folder name="Actions">
+        <folder name="Build">
+            <file name="org-openoffice-extensions-filetypes-unoidl-actions-CompileFileAction.instance">
+                <attr name="instanceClass" stringvalue="org.openoffice.extensions.filetypes.unoidl.actions.CompileFileAction"/>
+            </file>
+        </folder> 
+        <!--        <folder name="Window">
+            <file name="org-openoffice-extensions-util-typebrowser-UnoIdlTypeBrowserAction.instance"/>
+        </folder> -->
+        <folder name="Edit">
+            <file name="org-openoffice-extensions-filetypes-odf-OpenWithOpenOffice.instance"/>
+        </folder>
+    </folder>
+    
+    <folder name="Editors">
+        <folder name="text">
+            <folder name="x-uno-idl">
+<!--                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.editors.unoidl.Bundle"/>
+                <folder name="NetBeans">
+                    <folder name="Defaults">
+                        <file name="coloring.xml" url="editors/unoidl/resources/NetBeans-Idl-fontsColors.xml">
+                            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.editors.unoidl.Bundle"/>
+                        </file>
+                    </folder>
+                </folder> 
+                <folder name="CityLights">
+                    <folder name="Defaults">
+                        <file name="coloring.xml" url="editors/unoidl/resources/CityLights-Properties-fontsColors.xml">
+                            <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.editors.unoidl.Bundle"/>
+                        </file>
+                    </folder>
+                </folder> -->
+                <file name="language.nbs" url="filetypes/unoidl/language.nbs"/>
+<!--                <file name="Settings.settings" url="editors/unoidl/options/IdlOptions.settings"/>
+                <file name="EditorKit.instance">
+                    <attr name="instanceClass" stringvalue="org.openoffice.extensions.editors.unoidl.UnoIdlEditorKit"/>
+                </file> -->
+            </folder>
+        </folder>
+    </folder>
+    <folder name="Navigator">
+        <folder name="Panels">
+            <folder name="text">
+                <folder name="x-uno-idl">
+                    <file name="org-netbeans-modules-languages-features-LanguagesNavigator.instance"/>
+                </folder>
+            </folder>
+        </folder>
+    </folder>
+    
+    <!--    <folder name="Menu">        
+        <folder name="Window">
+            <file name="UnoIdlTypeBrowserAction.shadow">
+                <attr name="originalFile" stringvalue="Actions/Window/org-openoffice-extensions-util-typebrowser-UnoIdlTypeBrowserAction.instance"/>
+            </file>
+        </folder>
+    </folder>  -->
+    <folder name="Loaders">
+        <folder name="text">
+            <folder name="x-uno-idl">
+                <folder name="Actions">
+                    <file name="org-openide-actions-OpenAction.instance"/>
+                    <attr name="org-openide-actions-OpenAction.instance/org-openide-actions-FileSystemAction.instance" boolvalue="true"/>
+                    <attr name="org-openide-actions-OpenAction.instance/org-openoffice-extensions-separatorBefore.instance" boolvalue="true"/>
+                    <file name="org-openoffice-extensions-separatorBefore.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="org-openoffice-extensions-separatorBefore.instance/org-openoffice-extensions-filetypes-unoidl-actions-CompileFileAction.shadow" boolvalue="true"/>
+                    <file name="org-openoffice-extensions-filetypes-unoidl-actions-CompileFileAction.shadow">
+                        <attr name="originalFile" stringvalue="Actions/Build/org-openoffice-extensions-filetypes-unoidl-actions-CompileFileAction.instance"/>
+                    </file>
+                    <attr name="org-openoffice-extensions-filetypes-unoidl-actions-CompileFileAction.shadow/org-openoffice-extensions-filetypes-unoidl-actions-separatorAfter.instance" boolvalue="true"/>
+                    <file name="org-openoffice-extensions-separatorAfter.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="org-openoffice-unoidleditor-separatorAfter.instance/org-openide-actions-FileSystemAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-FileSystemAction.instance"/>
+                    <attr name="org-openide-actions-FileSystemAction.instance/sep-1.instance" boolvalue="true"/>
+                    <file name="sep-1.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-1.instance/org-openide-actions-CutAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-CutAction.instance"/>
+                    <attr name="org-openide-actions-CutAction.instance/org-openide-actions-CopyAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-CopyAction.instance"/>
+                    <attr name="org-openide-actions-CopyAction.instance/sep-2.instance" boolvalue="true"/>
+                    <file name="sep-2.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-2.instance/org-openide-actions-DeleteAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-DeleteAction.instance"/>
+                    <attr name="org-openide-actions-DeleteAction.instance/org-openide-actions-RenameAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-RenameAction.instance"/>
+                    <attr name="org-openide-actions-RenameAction.instance/sep-3.instance" boolvalue="true"/>
+                    <file name="sep-3.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-3.instance/org-openide-actions-SaveAsTemplateAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-SaveAsTemplateAction.instance"/>
+                    <attr name="org-openide-actions-SaveAsTemplateAction.instance/sep-4.instance" boolvalue="true"/>
+                    <file name="sep-4.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-4.instance/org-openide-actions-ToolsAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-ToolsAction.instance"/>
+                    <attr name="org-openide-actions-ToolsAction.instance/org-openide-actions-PropertiesAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-PropertiesAction.instance"/>
+                </folder>
+            </folder>
+            <folder name="x-vnd.oasis.opendocument.text">
+                <folder name="Actions">
+                    <file name="org-openide-actions-CopyAction.instance">
+                        <attr name="position" intvalue="500"/>
+                    </file>
+                    <file name="org-openide-actions-CutAction.instance">
+                        <attr name="position" intvalue="400"/>
+                    </file>
+                    <file name="org-openide-actions-DeleteAction.instance">
+                        <attr name="position" intvalue="700"/>
+                    </file>
+                    <file name="org-openide-actions-FileSystemAction.instance">
+                        <attr name="position" intvalue="200"/>
+                    </file>
+<!--                    <file name="org-openide-actions-OpenAction.instance">
+                        <attr name="position" intvalue="100"/>
+                    </file> -->
+                    <file name="org-openide-actions-PropertiesAction.instance">
+                        <attr name="position" intvalue="1300"/>
+                    </file>
+                    <file name="org-openide-actions-RenameAction.instance">
+                        <attr name="position" intvalue="800"/>
+                    </file>
+<!--                    <file name="org-openide-actions-SaveAsTemplateAction.instance">
+                        <attr name="position" intvalue="1000"/>
+                    </file> -->
+                    <file name="org-openide-actions-ToolsAction.instance">
+                        <attr name="position" intvalue="1200"/>
+                    </file>
+                    <file name="org-openoffice-extensions-filetypes-odf-OpenWithOpenOffice-separatorAfter.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="175"/>
+                    </file>
+                    <file name="org-openoffice-extensions-filetypes-odf-OpenWithOpenOffice-separatorBefore.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="125"/>
+                    </file>
+                    <file name="org-openoffice-extensions-filetypes-odf-OpenWithOpenOffice.shadow">
+                        <attr name="originalFile" stringvalue="Actions/Edit/org-openoffice-extensions-filetypes-odf-OpenWithOpenOffice.instance"/>
+                        <attr name="position" intvalue="150"/>
+                    </file>
+                    <file name="sep-1.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="300"/>
+                    </file>
+                    <file name="sep-2.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="600"/>
+                    </file>
+                    <file name="sep-3.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="900"/>
+                    </file>
+                    <file name="sep-4.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="1100"/>
+                    </file>
+                </folder>
+            </folder>
+            <folder name="xcs+xml">
+                <folder name="Actions">
+                    <file name="org-openide-actions-OpenAction.instance"/>
+                    <attr name="org-openide-actions-OpenAction.instance/org-openide-actions-FileSystemAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-FileSystemAction.instance"/>
+                    <attr name="org-openide-actions-FileSystemAction.instance/sep-1.instance" boolvalue="true"/>
+                    <file name="sep-1.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-1.instance/org-openide-actions-CutAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-CutAction.instance"/>
+                    <attr name="org-openide-actions-CutAction.instance/org-openide-actions-CopyAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-CopyAction.instance"/>
+                    <attr name="org-openide-actions-CopyAction.instance/sep-2.instance" boolvalue="true"/>
+                    <file name="sep-2.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-2.instance/org-openide-actions-DeleteAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-DeleteAction.instance"/>
+                    <attr name="org-openide-actions-DeleteAction.instance/org-openide-actions-RenameAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-RenameAction.instance"/>
+                    <attr name="org-openide-actions-RenameAction.instance/sep-3.instance" boolvalue="true"/>
+                    <file name="sep-3.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-3.instance/org-openide-actions-SaveAsTemplateAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-SaveAsTemplateAction.instance"/>
+                    <attr name="org-openide-actions-SaveAsTemplateAction.instance/sep-4.instance" boolvalue="true"/>
+                    <file name="sep-4.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-4.instance/org-openide-actions-ToolsAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-ToolsAction.instance"/>
+                    <attr name="org-openide-actions-ToolsAction.instance/org-openide-actions-PropertiesAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-PropertiesAction.instance"/>
+                </folder>
+            </folder>
+            <folder name="xcu+xml">
+                <folder name="Actions">
+                    <file name="org-openide-actions-OpenAction.instance"/>
+                    <attr name="org-openide-actions-OpenAction.instance/org-openide-actions-FileSystemAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-FileSystemAction.instance"/>
+                    <attr name="org-openide-actions-FileSystemAction.instance/sep-1.instance" boolvalue="true"/>
+                    <file name="sep-1.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-1.instance/org-openide-actions-CutAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-CutAction.instance"/>
+                    <attr name="org-openide-actions-CutAction.instance/org-openide-actions-CopyAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-CopyAction.instance"/>
+                    <attr name="org-openide-actions-CopyAction.instance/sep-2.instance" boolvalue="true"/>
+                    <file name="sep-2.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-2.instance/org-openide-actions-DeleteAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-DeleteAction.instance"/>
+                    <attr name="org-openide-actions-DeleteAction.instance/org-openide-actions-RenameAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-RenameAction.instance"/>
+                    <attr name="org-openide-actions-RenameAction.instance/sep-3.instance" boolvalue="true"/>
+                    <file name="sep-3.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-3.instance/org-openide-actions-SaveAsTemplateAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-SaveAsTemplateAction.instance"/>
+                    <attr name="org-openide-actions-SaveAsTemplateAction.instance/sep-4.instance" boolvalue="true"/>
+                    <file name="sep-4.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                    </file>
+                    <attr name="sep-4.instance/org-openide-actions-ToolsAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-ToolsAction.instance"/>
+                    <attr name="org-openide-actions-ToolsAction.instance/org-openide-actions-PropertiesAction.instance" boolvalue="true"/>
+                    <file name="org-openide-actions-PropertiesAction.instance"/>
+                </folder>
+            </folder>
+        </folder>
+    </folder>    
+    <folder name="Services">
+        <!--        <folder name="AutoupdateType">
+            <file name="org_openoffice_extensions_update_center.settings" url="org_openoffice_extensions_update_centerSettings.xml">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.Bundle"/>
+                <attr name="enabled" boolvalue="true"/>
+                <attr name="url_key" stringvalue="org_openoffice_extensions_update_center"/>
+            </file>
+        </folder> -->
+        <folder name="JavaHelp">
+            <file name="extensions-helpset.xml" url="extensions-helpset.xml"/>
+        </folder>
+        <folder name="MIMEResolver">
+            <!-- <file name="ImplObjectResolver.xml" url="filetypes/implobject/ImplObjectResolver.xml">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.filetypes.implobject.Bundle"/>
+            </file> -->
+            <file name="OdfResolver.xml" url="filetypes/odf/OdfResolver.xml">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.filetypes.odf.Bundle"/>
+            </file>
+            <file name="UnoIdlTypeResolver.xml" url="filetypes/unoidl/UnoIdlTypeResolver.xml">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.filetypes.unoidl.Bundle"/>
+            </file>
+            <file name="XcsResolver.xml" url="filetypes/xcs/XcsResolver.xml">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.filetypes.xcs.Bundle"/>
+            </file>
+            <file name="XcuResolver.xml" url="filetypes/xcu/XcuResolver.xml">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.openoffice.extensions.filetypes.xcu.Bundle"/>
+            </file>
+        </folder>
+    </folder>
+    <!--    <folder name="Windows2">
+          <folder name="Components">
+            <file name="UnoIdlTypeBrowserTopComponent.settings" url="util/typebrowser/UnoIdlTypeBrowserTopComponentSettings.xml"/>
+        </folder> 
+        <folder name="Modes">
+            <folder name="navigator">
+                <file name="UnoIdlTypeBrowserTopComponent.wstcref" url="util/typebrowser/UnoIdlTypeBrowserTopComponentWstcref.xml"/>
+            </folder>
+        </folder>
+    </folder> -->
+  
+    <folder name="Projects">
+        <!-- register lookup with project open hook -->
+        <folder name="org-netbeans-modules-java-j2seproject">
+            <folder name="Lookup">
+                <file name="org.openoffice.extensions.util.lookup.LookupProviderImpl.instance"/>
+            </folder>
+            <folder name="Nodes">
+                <file name="org.openoffice.extensions.util.nodes.ImportantFilesNodeFactoryImpl.instance">
+                    <attr name="position" intvalue="1200"/>
+                </file>            
+            </folder>
+           <folder name="Customizer">
+               <file name="Component.instance">
+                   <attr name="instanceCreate" methodvalue="org.openoffice.extensions.util.nodes.OOoCustomizerProvider.create"/>
+                   <attr name="position" intvalue="1200"/>
+               </file>
+           </folder>
+        </folder>
+        <!-- right click actions on own projects -->
+        <folder name="Actions">    
+            <file name="ownsep-1.instance">
+                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+            </file>
+            <attr name="ownsep-1.instance/org-openoffice-extensions-projecttemplates-actions-DebugAction.instance" boolvalue="true"/>
+            <file name="org-openoffice-extensions-projecttemplates-actions-DebugAction.instance"/>
+            <attr name="org-openoffice-extensions-projecttemplates-actions-DebugAction.instance/org-openoffice-extensions-projecttemplates-actions-DeployAndRunAction.instance" boolvalue="true"/>
+            <file name="org-openoffice-extensions-projecttemplates-actions-DeployAndRunAction.instance"/>
+            <attr name="org-openoffice-extensions-projecttemplates-actions-DeployAndRunAction.instance/org-openoffice-extensions-projecttemplates-actions-PackageAction.instance" boolvalue="true"/>
+            <file name="org-openoffice-extensions-projecttemplates-actions-PackageAction.instance"/>
+            <attr name="org-openoffice-extensions-projecttemplates-actions-PackageAction.instance/org-openoffice-extensions-projecttemplates-actions-OpenBrowser.instance" boolvalue="true"/>
+            <file name="org-openoffice-extensions-projecttemplates-actions-OpenBrowser.instance"/>
+            <attr name="org-openoffice-extensions-projecttemplates-actions-OpenBrowser.instance/ownsep-2.instance" boolvalue="true"/>
+            <file name="ownsep-2.instance">
+                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+            </file>
+<!--            <attr name="ownsep-2.instance/org-openoffice-extensions-projecttemplates-actions-UnoPropertiesAction.instance" boolvalue="true"/>
+            <file name="org-openoffice-extensions-projecttemplates-actions-UnoPropertiesAction.instance"/> -->
+        </folder>
+    </folder>
+</filesystem>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/org_openoffice_extensions_update_centerSettings.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/org_openoffice_extensions_update_centerSettings.xml?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/org_openoffice_extensions_update_centerSettings.xml (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/org_openoffice_extensions_update_centerSettings.xml Fri Jan 27 01:29:33 2012
@@ -0,0 +1,9 @@
+<?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.netbeans.modules.autoupdate/1"/>
+    <instanceof class="org.openide.ServiceType"/>
+    <instanceof class="org.netbeans.modules.autoupdate.AutoupdateType"/>
+    <instanceof class="org.netbeans.modules.autoupdate.XMLAutoupdateType"/>
+    <instance class="org.netbeans.modules.autoupdate.XMLAutoupdateType" method="createXMLAutoupdateType"/>
+</settings>

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,19 @@
+CTL_DeployAction=Deploy OpenOffice.org Extension
+CTL_PackageAction=Create OXT
+CTL_DebugAction=Debug Extension in Target OpenOffice.org
+CTL_RunAction=Deploy and Run Extension in OpenOffice.org
+CTL_PublishAction=Publish Extension on OpenOffice.org website
+CTL_OutputWindowName=OpenOffice.org Output
+CTL_UnoPropertiesAction=OXT Extension Properties
+LBL_Uno_Properties=OXT Extension Properties
+PackageActionDescription=Property for classpath expansion to reference external jars.
+
+# for all project types, store here the name of the connected zip file with the templates
+# NOI18N
+office.addon.project=org/openoffice/extensions/projecttemplates/addon/AddOnProject.zip
+# NOI18N
+office.calc.addin.project=org/openoffice/extensions/projecttemplates/calcaddin/AddinProject.zip
+# NOI18N
+office.component.project=org/openoffice/extensions/projecttemplates/component/ComponentProject.zip
+# NOI18N
+office.simple.client.project=org/openoffice/extensions/projecttemplates/unoclientapplication/UNOClientAppProject.zip
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_ja.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_ja.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_ja.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_ja.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,33 @@
+# CTL_DeployAction=Deploy OpenOffice.org Extension
+CTL_DeployAction=OpenOffice.org \u62e1\u5f35\u3092\u914d\u5099
+# CTL_PackageAction=Create OXT
+CTL_PackageAction=OXT \u3092\u4f5c\u6210
+# CTL_DebugAction=Debug Extension in Target OpenOffice.org
+CTL_DebugAction=\u30bf\u30fc\u30b2\u30c3\u30c8 OpenOffice.org \u3067\u62e1\u5f35\u3092\u30c7\u30d0\u30c3\u30b0
+# CTL_RunAction=Deploy and Run Extension in OpenOffice.org
+CTL_RunAction=OpenOffice.org \u3067\u62e1\u5f35\u3092\u914d\u5099\u3057\u3066\u5b9f\u884c
+# CTL_OutputWindowName=OpenOffice.org Output
+CTL_OutputWindowName=OpenOffice.org \u306e\u51fa\u529b
+# CTL_UnoPropertiesAction=OXT Extension Properties
+CTL_UnoPropertiesAction=OXT \u62e1\u5f35\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc
+# LBL_Uno_Properties=OXT Extension Properties
+LBL_Uno_Properties=OXT \u62e1\u5f35\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc
+# PackageActionDescription=Property for classpath expansion to reference external jars.
+PackageActionDescription=\u5916\u90e8\u53c2\u7167 JAR \u3078\u306e\u30af\u30e9\u30b9\u30d1\u30b9\u62e1\u5f35\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3002
+
+# for all project types, store here the name of the connected zip file awith the templates
+# NOI18N
+# office.addon.project=org/openoffice/extensions/projecttemplates/addon/AddOnProject.zip
+office.addon.project=org/openoffice/extensions/projecttemplates/addon/AddOnProject.zip
+# NOI18N
+# office.calc.addin.project=org/openoffice/extensions/projecttemplates/calcaddin/AddinProject.zip
+office.calc.addin.project=org/openoffice/extensions/projecttemplates/calcaddin/AddinProject.zip
+# NOI18N
+# office.component.project=org/openoffice/extensions/projecttemplates/component/ComponentProject.zip
+office.component.project=org/openoffice/extensions/projecttemplates/component/ComponentProject.zip
+# NOI18N
+# office.simple.client.project=org/openoffice/extensions/projecttemplates/unoclientapplication/UNOClientAppProject.zip
+office.simple.client.project=org/openoffice/extensions/projecttemplates/unoclientapplication/UNOClientAppProject.zip
+
+
+

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_pt_BR.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_pt_BR.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_pt_BR.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_pt_BR.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,18 @@
+CTL_DeployAction=Deploy OpenOffice.org Extension
+CTL_PackageAction=Create OXT
+CTL_DebugAction=Debug Extension in Target OpenOffice.org
+CTL_RunAction=Deploy and Run Extension in OpenOffice.org
+CTL_OutputWindowName=OpenOffice.org Output
+CTL_UnoPropertiesAction=OXT Extension Properties
+LBL_Uno_Properties=OXT Extension Properties
+PackageActionDescription=Property for classpath expansion to reference external jars.
+
+# for all project types, store here the name of the connected zip file awith the templates
+# NOI18N
+office.addon.project=org/openoffice/extensions/projecttemplates/addon/AddOnProject.zip
+# NOI18N
+office.calc.addin.project=org/openoffice/extensions/projecttemplates/calcaddin/AddinProject.zip
+# NOI18N
+office.component.project=org/openoffice/extensions/projecttemplates/component/ComponentProject.zip
+# NOI18N
+office.simple.client.project=org/openoffice/extensions/projecttemplates/unoclientapplication/UNOClientAppProject.zip
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_zh_CN.properties
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_zh_CN.properties?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_zh_CN.properties (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/Bundle_zh_CN.properties Fri Jan 27 01:29:33 2012
@@ -0,0 +1,17 @@
+CTL_DeployAction=\u90e8\u7f72 OpenOffice.org \u6269\u5c55\u7ec4\u4ef6
+CTL_PackageAction=\u521b\u5efa OXT
+CTL_DebugAction=\u5728\u76ee\u6807 OpenOffice.org \u4e2d\u8c03\u8bd5\u6269\u5c55\u7ec4\u4ef6
+CTL_RunAction=\u5728 OpenOffice.org \u4e2d\u90e8\u7f72\u5e76\u8fd0\u884c\u6269\u5c55\u7ec4\u4ef6
+CTL_OutputWindowName=OpenOffice.org \u8f93\u51fa
+CTL_UnoPropertiesAction=OXT \u6269\u5c55\u7ec4\u4ef6\u5c5e\u6027
+LBL_Uno_Properties=OXT \u6269\u5c55\u7ec4\u4ef6\u5c5e\u6027
+PackageActionDescription=\u7528\u4e8e\u5f15\u7528\u5916\u90e8 jar \u7684\u7c7b\u8def\u5f84\u6269\u5c55\u7ec4\u4ef6\u7684\u5c5e\u6027\u3002
+# for all project types, store here the name of the connected zip file awith the templates
+# NOI18N
+office.addon.project=org/openoffice/extensions/projecttemplates/addon/AddOnProject.zip
+# NOI18N
+office.calc.addin.project=org/openoffice/extensions/projecttemplates/calcaddin/AddinProject.zip
+# NOI18N
+office.component.project=org/openoffice/extensions/projecttemplates/component/ComponentProject.zip
+# NOI18N
+office.simple.client.project=org/openoffice/extensions/projecttemplates/unoclientapplication/UNOClientAppProject.zip

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DebugAction.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DebugAction.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DebugAction.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DebugAction.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: DebugAction.java,v $
+ *
+ *  $Revision: 1.4 $
+ *
+ *  last change: $Author: sg $ $Date: 2007/08/15 13:45:14 $
+ *
+ *  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.projecttemplates.actions;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Properties;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JComponent;
+import javax.swing.JMenuItem;
+import org.apache.tools.ant.module.api.support.ActionUtils;
+import org.netbeans.api.project.Project;
+import org.openide.awt.DynamicMenuContent;
+import org.openide.awt.Mnemonics;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.ContextAwareAction;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.Presenter;
+import org.openoffice.extensions.config.ConfigurationValidator;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.PathExchanger;
+import org.openoffice.extensions.util.ProjectTypeHelper;
+
+/**
+ *
+ * @author js93811
+ */
+public class DebugAction extends AbstractAction implements ContextAwareAction {
+
+    private static Process officeProcess;
+    
+    private ContextAction contextAction;
+    public void actionPerformed(ActionEvent e) {assert false;}
+    
+    public Action createContextAwareInstance(Lookup context) {
+        return new ContextAction(context);
+    }
+    
+    private boolean enable(Project p) {
+        assert p != null;        
+        // check if it is a special office extension project
+        return ProjectTypeHelper.isExtensionProject(p);
+    }
+    
+    private String labelFor(Project p) {
+        assert p != null;    
+        
+        return NbBundle.getMessage(DebugAction.class, "CTL_DebugAction"); // NOI18N
+    }
+    
+    private void perform(Project p) {
+        assert p != null;
+
+        boolean settingsValid = ConfigurationValidator.validateSettings();
+        
+        if (settingsValid) {  // NP when settings not valid
+            try {            
+                FileObject projectDir = p.getProjectDirectory();
+                String path = FileUtil.toFile(projectDir).getCanonicalPath();
+
+                UpdateExternalJarProperties.copyAdditionalJars(projectDir);
+
+                FileObject xmlFile = FileUtil.toFileObject(
+                            new File(path + File.separator
+                                           + "build.xml")); // NOI18N
+
+                Properties props = getPropertiesForDebugging(path);
+                ActionUtils.runTarget(xmlFile, new String[] { "uno-debug" }, props); // NOI18N
+
+            }
+            catch (IOException ex)
+            {
+                // TODO file can not be created , do something about it
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }
+            catch (URISyntaxException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }
+        }
+    }
+    
+    private Properties getPropertiesForDebugging(String projectPath) {
+        Properties props = new Properties();
+        // create a debug user installation in the build
+        File userDir = new File(projectPath + File.separator
+                                       + "build"
+                                       + File.separator
+                                       + "soffice_debug"); // NOI18N
+        String user_dir = null;
+        try {
+            // either the dir exists (with write access )or it must be created
+            if ((userDir.exists() && userDir.canWrite()) || userDir.mkdirs()) {
+                user_dir = userDir.getCanonicalPath();
+            }
+        } catch (IOException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        }
+        finally { // fall back to temp dir
+            if (user_dir == null)
+                user_dir = System.getProperty("java.io.tmpdir"); // NOI18N
+        }
+        props.setProperty("office.debug.user.directory", PathExchanger.pathToOfficeFileUrl(user_dir)); // NOI18N
+        return props;
+    }
+    
+    private final class ContextAction extends AbstractAction implements Presenter.Popup {
+        private final Project m_project;
+        
+        public ContextAction(Lookup context) {
+            Project p = (Project) context.lookup(Project.class);
+            m_project = (p != null && enable(p)) ? p : null;
+        }
+        
+        public void actionPerformed(ActionEvent e) {
+            perform(m_project);
+        }
+        
+        public JMenuItem getPopupPresenter() {
+            class Presenter extends JMenuItem implements DynamicMenuContent {
+                public Presenter() {
+                    super(ContextAction.this);
+                }
+                public JComponent[] getMenuPresenters() {
+                    if (m_project != null) {
+                        Mnemonics.setLocalizedText(this, labelFor(m_project));
+                        return new JComponent[] {this};
+                    } else {
+                        return new JComponent[0];
+                    }
+                }
+                public JComponent[] synchMenuPresenters(JComponent[] items) {
+                    return getMenuPresenters();
+                }
+            }
+            return new Presenter();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DeployAction.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DeployAction.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DeployAction.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DeployAction.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: DeployAction.java,v $
+ *
+ *  $Revision: 1.10 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/10/07 10:30: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.projecttemplates.actions;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JComponent;
+import javax.swing.JMenuItem;
+import org.apache.tools.ant.module.api.support.ActionUtils;
+import org.netbeans.api.project.Project;
+import org.openide.awt.DynamicMenuContent;
+import org.openide.awt.Mnemonics;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.ContextAwareAction;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.Presenter;
+import org.openoffice.extensions.config.ConfigurationValidator;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.ProjectTypeHelper;
+
+
+/**
+ *
+ * @author js93811
+ * @deprecated
+ */
+public class DeployAction extends AbstractAction implements ContextAwareAction {
+    public void actionPerformed(ActionEvent e) {assert false;}
+    
+    public Action createContextAwareInstance(Lookup context) {
+        return new ContextAction(context);
+    }
+    
+    private boolean enable(Project p) {
+        assert p != null;        
+        // check if it is a special office extension project
+        return ProjectTypeHelper.isExtensionProject(p);
+    }
+    
+    private String labelFor(Project p) {
+        assert p != null;    
+        
+        return NbBundle.getMessage(DeployAction.class, "CTL_DeployAction"); // NOI18N
+    }
+    
+    private void perform(Project p) {
+        assert p != null;
+
+        boolean settingsValid = ConfigurationValidator.validateSettings();
+        
+        if (settingsValid) { // NP when settings not valid
+            try {            
+                FileObject projectDir = p.getProjectDirectory();
+                String path = FileUtil.toFile(projectDir).getCanonicalPath();
+
+                UpdateExternalJarProperties.copyAdditionalJars(projectDir);
+
+                FileObject xmlFile = FileUtil.toFileObject(
+                            new File(path + File.separator
+                                           + "build.xml")); // NOI18N
+
+                ActionUtils.runTarget(xmlFile, new String[] { "uno-deploy" }, null); // NOI18N
+            }
+            catch (IOException ex)
+            {
+                // TODO file can not be created , do something about it
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }        
+            catch (URISyntaxException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }
+        }
+    }
+    
+    private final class ContextAction extends AbstractAction implements Presenter.Popup {
+        private final Project m_project;
+        
+        public ContextAction(Lookup context) {
+            Project p = (Project) context.lookup(Project.class);
+            m_project = (p != null && enable(p)) ? p : null;
+        }
+        
+        public void actionPerformed(ActionEvent e) {
+            perform(m_project);
+        }
+        
+        public JMenuItem getPopupPresenter() {
+            class Presenter extends JMenuItem implements DynamicMenuContent {
+                public Presenter() {
+                    super(ContextAction.this);
+                }
+                public JComponent[] getMenuPresenters() {
+                    if (m_project != null) {
+                        Mnemonics.setLocalizedText(this, labelFor(m_project));
+                        return new JComponent[] {this};
+                    } else {
+                        return new JComponent[0];
+                    }
+                }
+                public JComponent[] synchMenuPresenters(JComponent[] items) {
+                    return getMenuPresenters();
+                }
+            }
+            return new Presenter();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DeployAndRunAction.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DeployAndRunAction.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DeployAndRunAction.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/DeployAndRunAction.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: DeployAndRunAction.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/10/07 10:30: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.projecttemplates.actions;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JComponent;
+import javax.swing.JMenuItem;
+import org.apache.tools.ant.module.api.support.ActionUtils;
+import org.netbeans.api.project.Project;
+import org.openide.awt.DynamicMenuContent;
+import org.openide.awt.Mnemonics;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.ContextAwareAction;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.Presenter;
+import org.openoffice.extensions.config.ConfigurationValidator;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.ProjectTypeHelper;
+
+
+/**
+ *
+ * @author js93811
+ */
+public class DeployAndRunAction extends AbstractAction implements ContextAwareAction {
+    public void actionPerformed(ActionEvent e) {assert false;}
+    
+    public Action createContextAwareInstance(Lookup context) {
+        return new ContextAction(context);
+    }
+    
+    private boolean enable(Project p) {
+        assert p != null;        
+        // check if it is a special office extension project
+        return ProjectTypeHelper.isExtensionProject(p);
+    }
+    
+    private String labelFor(Project p) {
+        assert p != null;    
+        
+        return NbBundle.getMessage(DeployAndRunAction.class, "CTL_RunAction"); // NOI18N
+    }
+    
+    private void perform(Project p) {
+        assert p != null;
+
+        boolean settingsValid = ConfigurationValidator.validateSettings();
+        
+        if (settingsValid) { // NP when settings not valid
+            try {            
+                FileObject projectDir = p.getProjectDirectory();
+                String path = FileUtil.toFile(projectDir).getCanonicalPath();
+
+                UpdateExternalJarProperties.copyAdditionalJars(projectDir);
+
+                FileObject xmlFile = FileUtil.toFileObject(
+                            new File(path + File.separator
+                                           + "build.xml")); // NOI18N
+
+                ActionUtils.runTarget(xmlFile, new String[] { "uno-run" }, null); // NOI18N
+            }
+            catch (IOException ex)
+            {
+                // TODO file can not be created , do something about it
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }        
+            catch (URISyntaxException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }
+        }
+    }
+    
+    private final class ContextAction extends AbstractAction implements Presenter.Popup {
+        private final Project m_project;
+        
+        public ContextAction(Lookup context) {
+            Project p = (Project) context.lookup(Project.class);
+            m_project = (p != null && enable(p)) ? p : null;
+        }
+        
+        public void actionPerformed(ActionEvent e) {
+            perform(m_project);
+        }
+        
+        public JMenuItem getPopupPresenter() {
+            class Presenter extends JMenuItem implements DynamicMenuContent {
+                public Presenter() {
+                    super(ContextAction.this);
+                }
+                public JComponent[] getMenuPresenters() {
+                    if (m_project != null) {
+                        Mnemonics.setLocalizedText(this, labelFor(m_project));
+                        return new JComponent[] {this};
+                    } else {
+                        return new JComponent[0];
+                    }
+                }
+                public JComponent[] synchMenuPresenters(JComponent[] items) {
+                    return getMenuPresenters();
+                }
+            }
+            return new Presenter();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/OpenBrowser.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/OpenBrowser.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/OpenBrowser.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/OpenBrowser.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,152 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: OpenBrowser.java,v $
+ *
+ *  $Revision: 1.2 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/10/09 14:58:04 $
+ *
+ *  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.projecttemplates.actions;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JComponent;
+import javax.swing.JMenuItem;
+import org.apache.tools.ant.module.api.support.ActionUtils;
+import org.netbeans.api.project.Project;
+import org.openide.awt.DynamicMenuContent;
+import org.openide.awt.HtmlBrowser.URLDisplayer;
+import org.openide.awt.Mnemonics;
+import org.openide.execution.ExecutorTask;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.ContextAwareAction;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.Presenter;
+import org.openoffice.extensions.config.ConfigurationValidator;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.ProjectTypeHelper;
+
+
+/**
+ *
+ * @author js93811
+ */
+public class OpenBrowser extends AbstractAction implements ContextAwareAction {
+    public void actionPerformed(ActionEvent e) {assert false;}
+    
+    public Action createContextAwareInstance(Lookup context) {
+        return new ContextAction(context);
+    }
+    
+    private boolean enable(Project p) {
+        assert p != null;        
+        // check if it is a special office extension project
+        return ProjectTypeHelper.isExtensionProject(p);
+    }
+    
+    private String labelFor(Project p) {
+        assert p != null;    
+        
+        return NbBundle.getMessage(OpenBrowser.class, "CTL_PublishAction"); // NOI18N
+    }
+    
+    private void perform(Project p) {
+        assert p != null;
+
+        boolean settingsValid = ConfigurationValidator.validateSettings();
+        
+        if (settingsValid) { // NP when settings not valid
+            try {            
+                FileObject projectDir = p.getProjectDirectory();
+                String path = FileUtil.toFile(projectDir).getCanonicalPath();
+
+                UpdateExternalJarProperties.copyAdditionalJars(projectDir);
+
+                FileObject xmlFile = FileUtil.toFileObject(
+                            new File(path + File.separator
+                                           + "build.xml")); // NOI18N
+
+                ExecutorTask task = ActionUtils.runTarget(xmlFile, new String[] { "uno-package" }, null); // NOI18N
+                if (task.result() == 0) { // only publish something that sucessfully creates an oxt
+                    URL oooUrl = new URL("http://extensions.services.openoffice.org/resources/user/submission");
+                    URLDisplayer.getDefault().showURL(oooUrl);
+                }
+            }
+            catch (IOException ex)
+            {
+                // TODO file can not be created , do something about it
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }        
+            catch (URISyntaxException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }
+        }
+    }
+    
+    private final class ContextAction extends AbstractAction implements Presenter.Popup {
+        private final Project m_project;
+        
+        public ContextAction(Lookup context) {
+            Project p = (Project) context.lookup(Project.class);
+            m_project = (p != null && enable(p)) ? p : null;
+        }
+        
+        public void actionPerformed(ActionEvent e) {
+            perform(m_project);
+        }
+        
+        public JMenuItem getPopupPresenter() {
+            class Presenter extends JMenuItem implements DynamicMenuContent {
+                public Presenter() {
+                    super(ContextAction.this);
+                }
+                public JComponent[] getMenuPresenters() {
+                    if (m_project != null) {
+                        Mnemonics.setLocalizedText(this, labelFor(m_project));
+                        return new JComponent[] {this};
+                    } else {
+                        return new JComponent[0];
+                    }
+                }
+                public JComponent[] synchMenuPresenters(JComponent[] items) {
+                    return getMenuPresenters();
+                }
+            }
+            return new Presenter();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/PackageAction.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/PackageAction.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/PackageAction.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/PackageAction.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,175 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: PackageAction.java,v $
+ *
+ *  $Revision: 1.12 $
+ *
+ *  last change: $Author: sg $ $Date: 2008/10/07 10:30: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.projecttemplates.actions;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URISyntaxException;
+import java.util.Properties;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JComponent;
+import javax.swing.JMenuItem;
+import org.apache.tools.ant.module.api.support.ActionUtils;
+import org.netbeans.api.project.Project;
+import org.openide.awt.DynamicMenuContent;
+import org.openide.awt.Mnemonics;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.ContextAwareAction;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.Presenter;
+import org.openoffice.extensions.config.ConfigurationValidator;
+import org.openoffice.extensions.util.LogWriter;
+import org.openoffice.extensions.util.ManifestCreator;
+import org.openoffice.extensions.util.ProjectTypeHelper;
+
+
+/**
+ *
+ * @author js93811
+ */
+public class PackageAction extends AbstractAction implements ContextAwareAction {
+    public void actionPerformed(ActionEvent e) {assert false;}
+    
+    public Action createContextAwareInstance(Lookup context) {
+        return new ContextAction(context);
+    }
+    
+    private boolean enable(Project p) {
+        assert p != null;        
+        // check if it is a special office extension project
+        return ProjectTypeHelper.isExtensionProject(p);
+    }
+    
+    private String labelFor(Project p) {
+        assert p != null;    
+        
+        return NbBundle.getMessage(PackageAction.class, "CTL_PackageAction"); // NOI18N
+    }
+    
+    private void perform(Project p) {
+        assert p != null;
+
+        boolean settingsValid = ConfigurationValidator.validateSettings();
+        
+        if (settingsValid) { // NP when settings not valid
+            try {            
+                FileObject projectDir = p.getProjectDirectory();
+                String path = FileUtil.toFile(projectDir).getCanonicalPath();
+
+                UpdateExternalJarProperties.copyAdditionalJars(projectDir);
+
+                FileObject xmlFile = FileUtil.toFileObject(
+                            new File(path + File.separator
+                                           + "build.xml")
+//                          new File(path + File.separator
+//                                           + "nbproject"
+//                                           + File.separator
+//                                           + "build-uno-impl.xml")
+               ); // NOI18N
+
+                ProjectVersion.updateProjectFiles(projectDir);
+                
+                ManifestCreator mfc = new ManifestCreator(projectDir);
+                FileObject propsFile = projectDir.getFileObject("nbproject/project-uno.properties"); // NOI18N
+                Properties props = new Properties();
+                InputStream fileIn = null;
+                try {
+                    if (propsFile != null) {
+                        fileIn = propsFile.getInputStream();
+                        props.load(fileIn);
+                    }
+                }
+                catch (IOException ex) {
+                    LogWriter.getLogWriter().printStackTrace(ex);
+                }
+                finally {
+                    if (fileIn != null)
+                        fileIn.close();
+                }
+                
+                mfc.updateManifest(props);
+                
+                ActionUtils.runTarget(xmlFile, new String[] { "uno-package" }, null); // NOI18N
+            }
+            catch (IOException ex)
+            {
+                // TODO: file can not be created , do something about it
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }        
+            catch (URISyntaxException ex) {
+                LogWriter.getLogWriter().printStackTrace(ex);
+            }
+        }
+    }
+    
+    private final class ContextAction extends AbstractAction implements Presenter.Popup {
+        private final Project m_project;
+        
+        public ContextAction(Lookup context) {
+            Project p = (Project) context.lookup(Project.class);
+            m_project = (p != null && enable(p)) ? p : null;
+        }
+        
+        public void actionPerformed(ActionEvent e) {
+            perform(m_project);
+        }
+        
+        public JMenuItem getPopupPresenter() {
+            class Presenter extends JMenuItem implements DynamicMenuContent {
+                public Presenter() {
+                    super(ContextAction.this);
+                }
+                public JComponent[] getMenuPresenters() {
+                    if (m_project != null) {
+                        Mnemonics.setLocalizedText(this, labelFor(m_project));
+                        return new JComponent[] {this};
+                    } else {
+                        return new JComponent[0];
+                    }
+                }
+                public JComponent[] synchMenuPresenters(JComponent[] items) {
+                    return getMenuPresenters();
+                }
+            }
+            return new Presenter();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/ProjectVersion.java
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/ProjectVersion.java?rev=1236486&view=auto
==============================================================================
--- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/ProjectVersion.java (added)
+++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/actions/ProjectVersion.java Fri Jan 27 01:29:33 2012
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile: ProjectVersion.java,v $
+ *
+ *  $Revision: 1.10 $
+ *
+ *  last change: $Author: sg $ $Date: 2009/10/26 10:06:26 $
+ *
+ *  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.projecttemplates.actions;
+
+import java.io.IOException;
+import java.util.StringTokenizer;
+import java.util.regex.Pattern;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openoffice.extensions.util.LogWriter;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+/**
+ * Determine if an older created project is up to date and supports
+ * all features of this version of the plugin.
+ * If not, the build-uno.xml and project-uno.properties files have to
+ * be updated.
+ *
+ */
+public class ProjectVersion {
+
+    // plugin version as fallback if dynamic reading fails
+    public static final String PLUGIN_VERSION = "2.0.6.000205";
+    
+    public static final String PROPERTY_NAME = "property";  // NOI18N
+    public static final String PROJECT_NAME = "project";  // NOI18N
+    public static final String NAME_NAME = "name";  // NOI18N
+    public static final String SPEC_VERSION_NAME = "specversion"; // NOI18N
+    public static final String UNO_VERSION_NAME = "build.uno.version";  // NOI18N
+    public static final String VALUE_NAME = "value"; // NOI18N
+    
+    private String m_sLeastVersionString;
+    private String m_sProjectName;
+    
+    private static ProjectVersion s_projectVersion;
+    
+    public static void updateProjectFiles(FileObject projectRoot) {
+        if (s_projectVersion == null) {
+            s_projectVersion = new ProjectVersion();
+        }
+        if (!s_projectVersion.projectUpToDate(projectRoot)) {
+            UpdateProject.updateProject(projectRoot, 
+                s_projectVersion.m_sLeastVersionString, 
+                s_projectVersion.m_sProjectName);
+        }
+    }
+    
+    public static String getProjectVersion() {
+        if (s_projectVersion == null) {
+            s_projectVersion = new ProjectVersion();
+        }
+        return s_projectVersion.m_sLeastVersionString;
+    }
+    
+    /**
+     * Creates a new instance of ProjectVersion
+     * NOTE: debugging or deploying the plug-in in a new NB installation
+     * may lead to failure here because of different structures regarding 
+     * directories. Check this with properly installed versions and Hello World
+     * debugging.
+     */
+    private ProjectVersion() {
+        FileObject root = FileUtil.getConfigRoot();
+        
+        try {
+            FileObject ext_xml = root.getFileObject("Modules/org-openoffice-extensions.xml"); // NOI18N
+
+            XMLReader parser = XMLReaderFactory.createXMLReader();
+            VersionHandler vHandler = new VersionHandler(false);
+            parser.setContentHandler(vHandler);
+            InputSource source = new InputSource(ext_xml.getInputStream());
+            parser.parse(source);
+
+            m_sLeastVersionString = vHandler.getVersion();
+        } catch (IOException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        } catch (SAXException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        } catch (NullPointerException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        }
+        
+        // officeial version should be existent with a length and has to contain 
+        // at least two '.' and if not, set to small version so no updates happen.
+        if ((m_sLeastVersionString == null || m_sLeastVersionString.length() == 0) ||
+            m_sLeastVersionString.indexOf('.') == -1 ||
+            m_sLeastVersionString.indexOf('.') == m_sLeastVersionString.lastIndexOf('.')) {
+            m_sLeastVersionString = PLUGIN_VERSION;
+            LogWriter.getLogWriter().log(LogWriter.LEVEL_WARNING, 
+                "Cannot determine OOo plugin version, assuming " + m_sLeastVersionString); // NOI18N
+        }
+    }
+
+    /**
+     * Method for checking of the version of the important files
+     * for building a project: build-uno.xml and project-uno.properties.
+     * build-uno.xml contains a property for this.
+     * @param xmlFile the build-uno.xml file to check
+     * @returns true if the version in build-uno.xml is new enough, false otherwise
+     **/
+     // This method may be called often: at the beginning of every compile,
+     // deploy or debug action. It must be fast: use SAX parser
+    private boolean projectUpToDate(FileObject projectDir) {
+        boolean projectUpToDate = true; // if in doubt, don't change anything
+        try {
+            if (projectDir != null) {
+                FileObject xmlFile = projectDir.getFileObject("nbproject/build-uno-impl.xml"); // NOI18N
+                if (xmlFile != null) {
+                    XMLReader parser = XMLReaderFactory.createXMLReader();
+                    VersionHandler vHandler = new VersionHandler(true);
+                    parser.setContentHandler(vHandler);
+                    InputSource source = new InputSource(xmlFile.getInputStream());
+                    parser.parse(source);
+
+                    String version = vHandler.getVersion();
+                    m_sProjectName = vHandler.getProjectName();
+                    projectUpToDate = isProjectUpToDate(version);
+                }
+            }
+            
+        } catch (IOException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        } catch (SAXException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        } catch (NullPointerException ex) {
+            LogWriter.getLogWriter().printStackTrace(ex);
+        }
+        return projectUpToDate;
+    }
+    
+    private boolean isProjectUpToDate(String projectVersion) {
+        // fast exit for projects older than 1.1.0: no project version there
+        if (projectVersion == null) return false; 
+        boolean projectMatches = checkVersionFormat(projectVersion);
+        if (!projectMatches) {
+            // nothing more to do here: do not update, this is terra incognita 
+            return true;
+        }
+        // there are either three or four dots in projectVersion: since there are four in m_sLeastVersionString,
+        // the while() statement is safe
+        StringTokenizer projectTokens = new StringTokenizer(projectVersion, "."); // NOI18N
+        // chech for m_sLeastVersionString is in c'tor.
+        StringTokenizer leastVersionTokens = new StringTokenizer(m_sLeastVersionString, "."); // NOI18N
+        while (projectTokens.hasMoreTokens()) {
+            String projectString = projectTokens.nextToken();
+            String leastVersionString = leastVersionTokens.nextToken();
+            int project = new Integer(projectString).intValue();
+            int leastVersion = new Integer(leastVersionString).intValue();
+            if (project < leastVersion)
+                return false;
+        }
+        return true;
+    }
+    
+    /**
+     * To be relatively save in the future and to make sure we do not produce
+     * an exception when someone tampers with the project version, check the format.
+     * Right now, the versions are major.minor.micro.build_number, so the function
+     * returns true, if that format is recognized.
+     * Note that before version 2.0.5 of the plugin, the format was
+     * major.minor.micro, so if that format is recognized, the return value is also true.
+     * @param version the version to check.
+     * @return true if a correct version number was recognized
+     */
+    private boolean checkVersionFormat(String version) {
+        // first check current version format
+        boolean match = Pattern.matches("\\d+\\.\\d+\\.\\d+\\.\\d+", version); // NOI18N
+        // now check old format
+        if (!match) {
+            match = Pattern.matches("\\d+\\.\\d+\\.\\d+", version); // NOI18N
+        }
+        return match;
+    }
+    
+    /**
+     * Handler for getting the project version. This is used for getting
+     * the version from the installed plugin and from the current project.
+     * This is determined by the constructor: with true, the project version is
+     * read, with false it's the plugin version.
+     * Since this handler already parses the build-uno.xml, the name of the 
+     * project is also taken - is needed to be inserted into the updated 
+     * build-uno.xml version.
+     */
+    private class VersionHandler extends DefaultHandler {
+        private String version;
+        private String project;
+        private int allFound = 2; // 2 elements are searched, when found, rush through the rest
+        private boolean searchProjectVersion; // search version of local project or else version of installed plugin 
+        private boolean readElement;
+        private StringBuffer tmpVersion;
+        public VersionHandler(boolean searchProjectVersion) {
+            this.searchProjectVersion = searchProjectVersion;
+        }
+        public void startElement(String uri, String localName, 
+                String qName, Attributes attributes) throws SAXException {
+            if (searchProjectVersion) {
+                if (allFound > 0) {
+                    if (localName.equals(PROPERTY_NAME)) {
+                        String name = attributes.getValue(NAME_NAME);
+                        if (name != null && name.equals(UNO_VERSION_NAME)) {
+                            version = attributes.getValue(VALUE_NAME);
+                            allFound--;
+                        }
+                    }
+                    else if (localName.equals(PROJECT_NAME)) { // it's only one project element
+                        project = attributes.getValue(NAME_NAME);
+                        allFound--;
+                    }
+                }
+            }
+            else {
+                String name = attributes.getValue(NAME_NAME);
+                if (name.equals(SPEC_VERSION_NAME)) {
+                    tmpVersion = new StringBuffer();
+                    readElement = true;
+                }
+            }
+        }
+
+        public void characters(char[] ch, int start, int length) throws SAXException {
+            if (readElement) {
+                tmpVersion.append(ch, start, length);
+            }
+        }
+
+        public void endElement(String uri, String localName, String qName) throws SAXException {
+            if (readElement) {
+                version = tmpVersion.toString();
+                readElement = false;
+            }
+        }
+
+
+        public String getVersion() {
+            return version;
+        }
+        public String getProjectName() {
+            return project;
+        }
+    }
+}
+



Mime
View raw message