163 Commits

Author SHA1 Message Date
cad5f0e564 Fix #163: Make sure modules are compiled correctly with ant (#164)
Now with Apache ant to ensure compilation of a Java component as module,
it is now necessary to provide a `module-info.java` file and use **Java
11 or later**.
2025-05-26 08:22:40 +02:00
baf6a290b8 Fix #160: RegistrationHandler template fix (#161) 2025-04-14 15:29:12 +02:00
842cc81bea Fix #156 Passive registration fix (#157)
This passive registration registers all UNO services that are present in
a component's Java or Python implementation. This fixes issue #156.

To be considered as a UNO service a Java Class must have:
- An ctor with `com.sun.star.uno.XComponentContext` as unique parameter.
- A **static final** field `m_serviceNames` of type `String[]` (ie: an
array of String) and having as values the name of the UNO service. This
field can be private, protected or public, it doesn't matter.

For a Python class to be considered a UNO service it must:

- Exist a global variable `g_ImplementationHelper` declared as follows:
`g_ImplementationHelper = unohelper.ImplementationHelper()`.
- Exist a global variable `g_ImplementationName` declared as follows:
`g_ImplementationName = 'com.sun.star.MyServiceName'`.
- Exist a global variable `g_ServiceNames` declared as follows:
`g_ServiceNames = ('com.sun.star.task.JobExecutor', )`.
- Although this is not controlled, it will also be necessary for it to
have the following code:

```
g_ImplementationHelper.addImplementation(YourPythonClass,         # UNO object class
     g_ImplementationName,                                        # Implementation name
     g_ServiceNames)                                              # List of implemented services
```
2025-04-14 11:27:35 +02:00
9808cdfb0a Fix 57: Passive component registration (#152) 2025-03-27 07:00:55 +01:00
b61c2ecde3 Release 4.2.0 2025-02-17 09:07:42 +01:00
a3ce0b61d9 Tracking Eclipse .classpath changes (#146)
In order to improve the integration of **Ant** and `javac` now changes
to the Eclipse `.classpath` file will produce an update to the
`build.properties` file. This file has a new property
`uno.java.classpath` that allows to provide `javac` with all the
necessary dependencies when compiling.

If in Eclipse a sibling project is declared as a dependency then either
its jar archive (if it was produced by a `Build.jardesc` file) or its
`bin` folder (the folder where Eclipse puts the `.class` files) will be
available in the `uno.java.classpath` property of the `build.properties`
file.

This allows us to have compilations with `javac` (ie: **Ant**) that work
just as well as compilation by Eclipse's internal compiler.

Concerning the Java jar archives to be put in the `MANIFEST.MF`
`Class-Path` of a UNO Java project, there are two ways to do it:
- Either create a `lib` or `libs` folder at the root of the UNO project.
In this case all archives put in this folder are put in the `Class-Path`
of the `MANIFEST.MF`.
- In the absence of a `lib` or `libs` folder, all archives local to the
project and declared in the Eclipse build path will be put in the
`Class-Path` of the `MANIFEST.MF`.
2025-02-13 15:33:24 +01:00
2a185241bd Fix #142 Non-UNO project management (#143)
- Only UNO projects and not configured by default will be listed in Eclipse.
- The Ant script requires version 1.9.1 minimum and will let you know if necessary.
- It is possible to change the SDK of any project.
2025-02-03 07:49:05 +01:00
e29b319176 Fix #136, Fix #140 Recognize modular projects (#141)
If in Eclipse you have declared a Java version 9 or higher and there is
a file named **module-info.java** in the source folder then Eclipse will
automatically add the necessary libraries in the module path and no
longer in the class path as for a non-modular project.

Similarly LOEclipse will add the necessary LibreOffice libraries in the
module path if the project is modular.
Regarding the build of the oxt file, only the Ant script has been
updated to take into account the creation of modular archives.
2025-01-30 07:58:24 +01:00
d3d712cb3a Release 4.1.0 2025-01-27 08:27:24 +01:00
d2a3c56ea2 Fix #130 Support for SDK 24.x (#135)
Here is an update taking into account the idl file compilation utility
**unoidl-write** (see issue #130)

- Now if you change the LibreOffice and SDK version of a project (ie:
Project -> Properties -> LibreOffice Properties) then the
build.properties file will be updated if it exists.
- When generating the Ant script (ie: Project -> Export -> LibreOffice
-> Generate Ant script file) the build.properties file will be created
if it does not exist.
- The main builder of the UNO-IDL (ie:
org.libreoffice.ide.eclipse.core.builders.TypesBuilder.java) will
automatically switch to the utility provided by the SDK (ie: idlc or
unoidl-write) if it changes.
- The Ant script has been updated to take into account unoidl-write and
the different filenames on Windows (ie: unoidl-write vs
unoidl_write.exe).
- Many corrections on the integration of SDK tools have been made in
order to support Windows. However, concerning Windows, no tests has be
done because I am not able to do them.
2025-01-25 15:53:29 +01:00
847ce5f9a5 Fix Eclipse warnings (#126)
- In order to take advantage of the warnings in Eclipse the
**CheckStyle** plugin has been restarted (ie: it was no longer correctly
configured) and all files whose code did not meet the requirements of
the `/build/checkstyle.xml` file have been updated. It is expected that
the file headers (license and copyright) will be modified in order to
avoid the last warnings still visible in Eclipse.
- Java 17 is now the minimum version. This seem to be required by the
various Eclipse archives that LOEclipse uses (ie: org.eclipse.jdt).
- The template java file
`java/source/org/libreoffice/ide/eclipse/java/registration/RegistrationHandler.java.tpl`
has been rewritten using generics so that Eclipse warnings stop.
- The test file
`core/source/org/libreoffice/ide/eclipse/core/wizards/pages/ManifestExportPageControllerTest.java`
has been moved to the
`core/source/org/libreoffice/ide/eclipse/core/unittests` folder to allow
error-free compilation. This seems to fix [issue
#125](https://github.com/LibreOffice/loeclipse/issues/125).
- All Java methods marked as deprecated have been updated to their
replacement method.

Following this PR there are still in the Eclipse problems:
- 21 warnings including 4 TODO.
- 72 infos corresponding to the file headers (license and copyright).
2025-01-13 07:50:50 +01:00
67437ab79f Improved management of package.properties file (#123) (fix #117, fix #119)
An uncompressed mimetype file at the beginning of the oxt files has been added. It is supposed to help with the recognition of the oxt file type on Apple platforms.

Updating the package.properties file will be done either through the CheckBoxTreeViewer or through the text editor. Changing one will change the other. The loading of this window has been optimized (a few seconds).

Files and directories that are symbolic links are now visible in the CheckBoxTreeViewer (ie: no more filtering) and taken into account in the build of oxt archives. This allows to benefit from a single source for the location of libraries and therefore easier updates.
2024-12-23 14:56:04 +01:00
179c20d26b update error handling for checking the RegistrationHandler.classes file. (#104)
1. extend the error info when the file RegistrationHandler.classes does not exist in the package defined by company prefix and outputextension
2. display the error dialog in syncExec thread
3. throw an exception when error with RegistrationHandler.classes file
2023-04-20 08:46:03 +02:00
1bb1a874f3 Release 4.0.2 2023-04-03 10:59:55 +02:00
9b66c3e0ba Fix #85 Check libs subfolder on uno package creation (#102) 2023-04-03 09:27:14 +02:00
6797bd7943 Release 4.0.1 2020-08-27 08:28:21 +02:00
5310fc6ec6 Fix typo in method name 2020-08-25 14:26:09 +02:00
e396c7e70a Release 4.0.0 2020-06-15 15:01:55 +02:00
31a785bd7a Remove noise from file header 2020-06-15 14:58:27 +02:00
5957a2a5cf Support LibreOffice 7.0
Which moved java stuff to libreoffice.jar
See https://wiki.documentfoundation.org/ReleaseNotes/7.0#Java_support for details
2020-06-15 14:39:07 +02:00
9207446a8d add debug when collecting jars from lib dir 2020-06-15 12:37:45 +02:00
074eab804c added Gradle/Buildship support:
When subdir "libs" in Project root dir exist, then all the Jars are used as external libs.
1. Listet into the main-jar meta.inf file
2. Copied into the generated otx file
2020-06-15 12:37:28 +02:00
eb05e43107 Update baseline to Java 1.8 2020-06-15 12:31:18 +02:00
2e68515507 Release 3.0.1 2019-07-16 10:46:09 +02:00
0388dd3dfd Fix for build failing when build dir is empty 2019-07-16 10:44:44 +02:00
8dc344f3a7 Fix running javamaker with spaces in project path (#72) 2019-06-26 08:17:31 +02:00
e72f1e9192 Release 3.0.0 2018-10-27 13:53:25 +02:00
635bd9b7df Enabling Python nature to the project and fixing changes for 25-Jun-18 2018-10-26 19:05:52 +02:00
99cba30f21 Phase 2:Changes discussed in mail and chat (build.xml & skeleton file) 2018-10-26 19:05:52 +02:00
4289807cea Phase 1: Changes as discussed in mail and chat 2018-10-26 19:05:52 +02:00
c704ba9bcf A new Module is created for placing the codes for Python and a new
nearly empty Python project is created under New Extension Wizard.
2018-10-26 19:05:52 +02:00
8727a002f3 Release 2.3.0 2018-05-14 12:01:43 +02:00
3113b244f6 Fix #21: Show error when RegistrationHandler.classes empty (#67)
show an error message when RegistrationHandler.classes is empty
2018-05-14 11:55:44 +02:00
7842ff7703 Fix #52 Create a separate export Ant script option (#66)
Before this was hidden in the export package dialog and hard to discover
2018-03-26 09:31:22 +02:00
ac7e3a9724 Release 2.2.6 2017-09-04 11:44:05 +02:00
d9d21670ed Release 2.2.5 2017-07-11 11:36:46 +02:00
3e05000eb0 Release 2.2.4 2017-03-13 18:27:23 +01:00
e83437d472 Related #38: Follow-up fix for 22c4c13 2017-03-10 11:00:33 +01:00
22c4c133de Fix #38 Prefill build.properties with current LO&SDK installation (#46) 2017-03-10 10:59:52 +01:00
c1aba2a7c9 Fix #43: Remove java version selector from extension wizard (#44) 2016-12-12 15:41:45 +01:00
e8df71f1dd Release 2.2.3 2016-09-28 09:44:53 +02:00
3e2d503b38 Fix #41 Wrong classpath syntax for multiple jars
Need to use space as delimiter instead of comma
2016-09-28 09:41:56 +02:00
9cca820c76 Release 2.2.2 2016-09-27 17:11:02 +02:00
d58a343a91 Fix #40 wrong path separators in jar manifest 2016-09-27 15:16:52 +02:00
023c2f1196 Release 2.2.1 2016-09-14 16:58:17 +02:00
93fd6002c9 Release 2.2.0 2016-08-31 17:39:21 +02:00
fa64785c3c We switched to JUnit 4 2016-08-31 17:38:53 +02:00
80d6fae0ac Ant script: Remove superfluous lines from build.properties 2016-08-26 09:06:19 +02:00
66cb65d475 Ant file: Mention required setup 2016-08-25 14:03:26 +02:00
570c63f4ca Ant file: Mention external libraries 2016-08-25 12:58:17 +02:00