fdo#46102: Fix Java script examples after gbuild'ification

...they contained no class files anymore, due to missing gb_Jar_set_packageroot
calls.  However, those calls only work for subdirectories, i.e., the example
.java files need to be put into a package (I chose
org.libreoffice.example.java_scripts) for all of them).  This in turn required
adaption of the parcel-descriptor.xml files; not sure what the logicalname
entries there are good for if anything -- the macro names at "Tools - Macros -
Run Macro..." now unfortunately(?) contain the fully qualified paths for the
HelloWorld, HighlightText, and MemoryUpdate examples.  There are additional
examples at scripting/examples/java/ that apparently do not get packaged (but I
adapted them anyway).
This commit is contained in:
Stephan Bergmann
2012-03-23 16:11:42 +01:00
parent dd6c4f4db1
commit 0b9fda25f3
23 changed files with 41 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import com.sun.star.script.provider.XScriptContext;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.text.XTextDocument;

View File

@@ -7,7 +7,7 @@
Prints "Helo World".
</description>
</locale>
<functionname value="HelloWorld.printHW"/>
<functionname value="org.libreoffice.example.java_scripts.HelloWorld.printHW"/>
<logicalname value="HelloWorld.printHW"/>
<languagedepprops>
<prop name="classpath" value="HelloWorld.jar"/>

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.script.provider.XScriptContext;
import com.sun.star.lang.XMultiComponentFactory;

View File

@@ -8,7 +8,7 @@
Text highlighting
</description>
</locale>
<functionname value="HighlightText.showForm"/>
<functionname value="org.libreoffice.example.java_scripts.HighlightText.showForm"/>
<logicalname value="HighlightText.showForm"/>
<languagedepprops>
<prop name="classpath" value="Highlight.jar"/>

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import java.util.Random;
import java.util.Date;
import com.sun.star.uno.UnoRuntime;

View File

@@ -7,7 +7,7 @@
Text highlighting
</description>
</locale>
<functionname value="MemoryUsage.updateMemoryUsage"/>
<functionname value="org.libreoffice.example.java_scripts.MemoryUsage.updateMemoryUsage"/>
<logicalname value="MemoryUtils.MemUsage"/>
<languagedepprops>
<prop name="classpath" value="MemoryUsage.jar"/>

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.uno.XComponentContext;

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
public class NewsGroup
{

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
//import com.sun.star.frame.XComponentLoader;
import java.io.*;
import com.sun.star.lang.XComponent;

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import javax.mail.*;
import javax.mail.internet.*;
import com.msoft.mail.provider.nntp.NNTPTransport;

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import java.io.*;
import java.util.Vector;

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import java.io.File;
import java.io.InputStream;
import java.io.IOException;

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JPanel;

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import javax.swing.SwingUtilities;
import java.io.InputStream;

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import java.io.InputStream;
import drafts.com.sun.star.script.framework.runtime.XScriptContext;

View File

@@ -8,7 +8,7 @@
<description>Script that starts debuggers for JavaScript and BeanShell
</description>
</locale>
<logicalname value="_$DebugRunner.Debug" />
<logicalname value="org.libreoffice.example.java_scripts._$DebugRunner.Debug" />
<functionname value="DebugRunner.go" />
<languagedepprops>
<prop name="classpath" value="debugger.jar"/>

View File

@@ -1,3 +1,5 @@
package org.libreoffice.example.java_scripts;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.table.*;

View File

@@ -8,7 +8,7 @@
Prototype Script Selector GUI for StarOffice
</description>
</locale>
<functionname value="ScriptSelector.showOrganizer"/>
<functionname value="org.libreoffice.example.java_scripts.ScriptSelector.showOrganizer"/>
<logicalname value="ScriptSelector.showOrganizer"/>
<languagedepprops>
<prop name="classpath" value="selector.jar"/>