diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-03-23 16:11:42 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-03-23 16:20:17 +0100 |
commit | 0b9fda25f321ce2697179064e330843237177668 (patch) | |
tree | 9be4cf5c4cc7a6f0a6c5d0bf02ae09bd7cd87a5d /scripting/examples/java | |
parent | dd6c4f4db1d62268d73e09ae52d23f760a967dcc (diff) |
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).
Diffstat (limited to 'scripting/examples/java')
20 files changed, 35 insertions, 5 deletions
diff --git a/scripting/examples/java/HelloWorld/HelloWorld.java b/scripting/examples/java/HelloWorld/HelloWorld.java index eaed56fc6063..48f72e0d202d 100644 --- a/scripting/examples/java/HelloWorld/HelloWorld.java +++ b/scripting/examples/java/HelloWorld/HelloWorld.java @@ -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; diff --git a/scripting/examples/java/HelloWorld/parcel-descriptor.xml b/scripting/examples/java/HelloWorld/parcel-descriptor.xml index 692933afbae2..61375a4f3139 100755 --- a/scripting/examples/java/HelloWorld/parcel-descriptor.xml +++ b/scripting/examples/java/HelloWorld/parcel-descriptor.xml @@ -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"/> diff --git a/scripting/examples/java/Highlight/HighlightText.java b/scripting/examples/java/Highlight/HighlightText.java index 14a02e397270..1b45e229cb03 100644 --- a/scripting/examples/java/Highlight/HighlightText.java +++ b/scripting/examples/java/Highlight/HighlightText.java @@ -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; diff --git a/scripting/examples/java/Highlight/parcel-descriptor.xml b/scripting/examples/java/Highlight/parcel-descriptor.xml index 2612eaec4632..54e2a88f5c5b 100755 --- a/scripting/examples/java/Highlight/parcel-descriptor.xml +++ b/scripting/examples/java/Highlight/parcel-descriptor.xml @@ -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"/> diff --git a/scripting/examples/java/MemoryUsage/MemoryUsage.java b/scripting/examples/java/MemoryUsage/MemoryUsage.java index 727f94a9291c..6fc1ba74a997 100644 --- a/scripting/examples/java/MemoryUsage/MemoryUsage.java +++ b/scripting/examples/java/MemoryUsage/MemoryUsage.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import java.util.Random; import java.util.Date; import com.sun.star.uno.UnoRuntime; diff --git a/scripting/examples/java/MemoryUsage/parcel-descriptor.xml b/scripting/examples/java/MemoryUsage/parcel-descriptor.xml index e09bf4a81517..ec7daba52317 100755 --- a/scripting/examples/java/MemoryUsage/parcel-descriptor.xml +++ b/scripting/examples/java/MemoryUsage/parcel-descriptor.xml @@ -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"/> diff --git a/scripting/examples/java/Newsgroup/MimeConfiguration.java b/scripting/examples/java/Newsgroup/MimeConfiguration.java index 8604c0afbd1b..f0a2bd1c28ae 100644 --- a/scripting/examples/java/Newsgroup/MimeConfiguration.java +++ b/scripting/examples/java/Newsgroup/MimeConfiguration.java @@ -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; diff --git a/scripting/examples/java/Newsgroup/NewsGroup.java b/scripting/examples/java/Newsgroup/NewsGroup.java index 714b81ec86ce..be1c404e2769 100644 --- a/scripting/examples/java/Newsgroup/NewsGroup.java +++ b/scripting/examples/java/Newsgroup/NewsGroup.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + public class NewsGroup { diff --git a/scripting/examples/java/Newsgroup/OfficeAttachment.java b/scripting/examples/java/Newsgroup/OfficeAttachment.java index c2816e0e133b..2455f6ea350a 100644 --- a/scripting/examples/java/Newsgroup/OfficeAttachment.java +++ b/scripting/examples/java/Newsgroup/OfficeAttachment.java @@ -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; diff --git a/scripting/examples/java/Newsgroup/PostNewsgroup.java b/scripting/examples/java/Newsgroup/PostNewsgroup.java index a88b1d3e8844..b25049d1c908 100644 --- a/scripting/examples/java/Newsgroup/PostNewsgroup.java +++ b/scripting/examples/java/Newsgroup/PostNewsgroup.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import java.awt.*; import java.awt.event.*; import javax.swing.*; diff --git a/scripting/examples/java/Newsgroup/Sender.java b/scripting/examples/java/Newsgroup/Sender.java index eb1da2868f0d..653e5e1359d7 100644 --- a/scripting/examples/java/Newsgroup/Sender.java +++ b/scripting/examples/java/Newsgroup/Sender.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import javax.mail.*; import javax.mail.internet.*; import com.msoft.mail.provider.nntp.NNTPTransport; diff --git a/scripting/examples/java/Newsgroup/StatusWindow.java b/scripting/examples/java/Newsgroup/StatusWindow.java index 2fcffaeb6ca6..389181f80371 100644 --- a/scripting/examples/java/Newsgroup/StatusWindow.java +++ b/scripting/examples/java/Newsgroup/StatusWindow.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import java.awt.*; import java.awt.event.*; import javax.swing.*; diff --git a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java index b227791c0299..c1d935f4d982 100644 --- a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java +++ b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import java.io.*; import java.util.Vector; diff --git a/scripting/examples/java/debugger/DebugRunner.java b/scripting/examples/java/debugger/DebugRunner.java index 4430b970b6bf..c1d5f4695238 100644 --- a/scripting/examples/java/debugger/DebugRunner.java +++ b/scripting/examples/java/debugger/DebugRunner.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import java.io.File; import java.io.InputStream; import java.io.IOException; diff --git a/scripting/examples/java/debugger/OOBeanShellDebugger.java b/scripting/examples/java/debugger/OOBeanShellDebugger.java index be91aa458163..eadb3a5a5d19 100644 --- a/scripting/examples/java/debugger/OOBeanShellDebugger.java +++ b/scripting/examples/java/debugger/OOBeanShellDebugger.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import javax.swing.JFrame; import javax.swing.JTextArea; import javax.swing.JPanel; diff --git a/scripting/examples/java/debugger/OORhinoDebugger.java b/scripting/examples/java/debugger/OORhinoDebugger.java index 0aea985cc5f2..209f4f727031 100644 --- a/scripting/examples/java/debugger/OORhinoDebugger.java +++ b/scripting/examples/java/debugger/OORhinoDebugger.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import javax.swing.SwingUtilities; import java.io.InputStream; diff --git a/scripting/examples/java/debugger/OOScriptDebugger.java b/scripting/examples/java/debugger/OOScriptDebugger.java index 67532e113f9e..c46bbc5715f7 100644 --- a/scripting/examples/java/debugger/OOScriptDebugger.java +++ b/scripting/examples/java/debugger/OOScriptDebugger.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import java.io.InputStream; import drafts.com.sun.star.script.framework.runtime.XScriptContext; diff --git a/scripting/examples/java/debugger/parcel-descriptor.xml b/scripting/examples/java/debugger/parcel-descriptor.xml index 285db1bb7b15..f432bfe6de56 100755 --- a/scripting/examples/java/debugger/parcel-descriptor.xml +++ b/scripting/examples/java/debugger/parcel-descriptor.xml @@ -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"/> diff --git a/scripting/examples/java/selector/ScriptSelector.java b/scripting/examples/java/selector/ScriptSelector.java index 698faa5a6f04..93475fef8def 100644 --- a/scripting/examples/java/selector/ScriptSelector.java +++ b/scripting/examples/java/selector/ScriptSelector.java @@ -1,3 +1,5 @@ +package org.libreoffice.example.java_scripts; + import javax.swing.*; import javax.swing.tree.*; import javax.swing.table.*; diff --git a/scripting/examples/java/selector/parcel-descriptor.xml b/scripting/examples/java/selector/parcel-descriptor.xml index 8e3e70e8c60b..951fdde60c2b 100755 --- a/scripting/examples/java/selector/parcel-descriptor.xml +++ b/scripting/examples/java/selector/parcel-descriptor.xml @@ -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"/> |