-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move from active to passive component registration #57
Comments
When a <procjectName>.component file exists in the project root, add it to the extension. This allows to use passive component registration for extensions.
.component files will now be detected if they are placed in the project root with the name |
@prrvchr Help appreciated with the two remaining tasks :) |
@smehrbrodt , could you explain to me a little better what this change is? Thanks. |
Extensions need to tell LibreOffice about themselves - which services they offer and which implementation for these services they have. Nowadays, extensions no longer need to actively call that Here is a simple example for a project called
Currently, when you save that file as What needs doing now is to adjust the code which writes |
For now the entry in the JAR archive is given by the property After that the services offered by the archive are in the file How is this mechanism reproduced with the use of xml files? |
Yes, the |
It seems to me that adding a In fact, how do we recognize that it is indeed a Class implementation of a UNO service? |
The That method needs to be adapted to write the component xml file instead. |
Ok this is about creating or updating a But if we don't write to the |
Ah right, we need to keep writing to it when it already exists in the project. But we can remove the |
Yes, a |
If this method is to be kept in order to perform active and passive registration then the Am I wrong or not? |
Yeah you are right, we can't delete it, the |
Yes and maybe the method |
Yep makes sense. |
I have a problem. When adding or removing an implementation it is necessary to know the name of the implementation class but also the name of the UNO service of this implementation (both information seems necessary in the project.component xml file). I don't really see how to get the service name from the implementation file? |
Well if I follow the example it seems that the On the other hand, I am surprised by the value of the |
Yes, see this class: https://opengrok.libreoffice.org/xref/core/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Services.java?r=ffb1e88afae5b83d58337a84a27f9c6293f6fcd9#19 |
Well I can generate the
But if I try to install this extension then I have the error message: It seems to me that LibreOffice does not differentiate a passive registration from an active registration? |
Can you share the resulting oxt file? |
The oxt file is 55.7 MiB in size (it's the jdbcDriverOOo extension) I can't upload because of the size I guess. But this last version installs correctly, however the only difference is that it uses the |
Here is what I found for the RegistrationHandler.class.
And the corresponding
|
I don't really understand the advantage of passive registration over active registration. The main difference is the absence of the two static methods:
And it seems that it is not possible to get rid of the Did I miss something? |
In order for passive registration to work, it is necessary to declare the xml I have trouble reading the source code and explaining this error |
With an XML file like this everything works perfectly... The uri attribute is important....
|
Looks good! The main advantage is less code that people don't understand, replaced with a simple readable xml file. |
Drop RegistrationHandler and use .component files instead.
.component
files.component
files when creating a new projectThe text was updated successfully, but these errors were encountered: