Open Hercle999 opened 1 year ago
I could display the addon menu on also Writer and Impress.
Menu > View > User Interface > UI variants > Standard Toolbar.
But it still haven't worked.
So what's the content of RegistrationHandler.classes ?
Thank you for your reply.
I got this code from SDK or sample package, and it was hardly changed.
There must be another file RegistrationHandler.classes in your project, what's the content of that file?
Written:
example.example.ExtensionMainImpl
Suddenly, even running LibreOffice from eclipse was unenabled.
It was back to the state wrote at first comment after being resolved #99.
My plugin can work from eclipse, but don't work when install the plugin.
A error is occur when I try to export a oxt file.
I updated LibreOffice and SDK today to version 7.5.1.
I received an answer to my question on ask.libreoffice.org https://ask.libreoffice.org/t/sdk-is-missing-idl-folder/89549 and also to the bug I raised here https://bugs.documentfoundation.org/show_bug.cgi?id=154341
The bottom line appears to be that the SDK no longer includes an /idl folder. This breaks LOEclipse. See also #99
There appear to have been no updates to the code of LOEclipse in the last three years. Does this plugin have a future, or should we just move on to some other solution?
Better, fix the code yourself, LOEclipse is no Rocket Science :-)
Thanks for investigating this! Pull requests more than welcome indeed.
Otherwise I will fix this in the next weeks and do a new release. Please use an older SDK until then.
I would absolutely love to get involved, but I don't have the skills yet. I have to learn pull requests, how to debug Eclipse and Eclipse plugins, and probably at least a little Java first.
Many thanks @michaelmassee for the fix! I published a new release with the fix, it should show up in Eclipse when checking for updates. Let me know if it works.
I tried the latest LOEclipse, but the situation is the same.
My extension work normally when move from eclipse. But don't work when install to Libreoffice.
The same error is occured then eclipse menu > file > export.
Why this thread was closed even if I couldn't resolve this issue?
"Why this thread was closed even if I couldn't resolve this issue?" Very Simple ... Because you have an empty RegistrationHandle.classes file. This has nothing to do with adding a 7.5+ SDK ! See Topic Description Post your Contents of RegistrationHandle.classes file
I've sent the content of RegistrationHandle.classes.
It is the content, one line text. example.example.ExtensionMainImpl
path/location of your RegistrationHandler.classes and RegistrationHandler.java files ?
The path is below.
/project_name/source/example/example/RegistrationHandler.classes
file location seems okay for me ....
The only location i found for this error msg is :
` public static void isFileEmpty(IUnoidlProject pProject) {
if (checkFileEmpty) {
PluginLogger.error(Messages.getString("RegistrationHelper.RegistrationHandlerEmptyClassError"));
MessageDialog.openError(Display.getDefault().getActiveShell(), "Error",
Messages.getString("RegistrationHelper.RegistrationHandlerEmptyClassError"));
}
`
this checks IUnoidlProject, not RegistrationHandler.classes ??? i must do some debuging to understand what is going on here ...
Thank you for dealing my issue.
As I said, my extension work from eclipse on Libreoffice, but couldn't export. I wonder this.
` /**
@return the implementation classes file of the project. */ private static IFile getClassesListFile(IUnoidlProject pProject) { // Get the path where to place the class and the implementations list IPath relPath = pProject.getImplementationPath(); IFolder dest = pProject.getFolder(relPath);
return dest.getFile("RegistrationHandler.classes"); //$NON-NLS-1$
} ` is the file "RegistrationHandler.classes" in your project implementation directory ?
` @Override public IPath getImplementationPath() { String path = new String(mCompanyPrefix + "." + mOutputExtension).replace('.', '/'); //$NON-NLS-1$ return getSourcePath().append(path); }
`
Sorry, but I don't know where is "implementation directory" and I don't know how to use the source you shown.
your RegistrationHandler.classes is probably at the wrong place
check your .unoproject file
String path = new String(mCompanyPrefix + "." + mOutputExtension).replace('.', '/');
mOutputExtension = project.implementation = comp mCompanyPrefix = project.prefix = de.xxx.yyy
so the file RegistrationHandler.classes must be in de/xxx/yyy/comp
the empty error msg is also shown when the file ist not found
Where is the path?
de/xxx/yyy/comp
======================================= The content of .unoproject is below.
project.prefix=org.libreoffice.example project.language=Java project.ooo=LibreOffice 7.5 #1 project.idl=/idl regclassname=example.example.RegistrationHandler project.implementation=comp project.build=build project.sdk=LibreOffice sdk 7.5.0.3 project.srcdir=/source javaversion=java5
de/xxx/yyy/comp -> was an Example
so with your settings in .unoproject
project.prefix=org.libreoffice.example project.implementation=comp
the file RegistrationHandler.classes must be in the package org.libreoffice.example.comp -> folder -> org/libreoffice/example/comp
i did some changes in the error handling to give you some more information see pullrequest https://github.com/LibreOffice/loeclipse/pull/104
The path is below. /project_name/source/example/example/RegistrationHandler.classes
So should I change the parameters like below?
project.prefix=source.example project.implementation=example
/project_name/source/ -> is the base project directory ????
if you change project.prefix=source.example project.implementation=example
then the RegistrationHandler.classes file must be in the package source.example.example
show me your Package structure in Eclipse
in the project folder "project_name".
okay :-)
change in .unoproject
project.prefix=example.example project.implementation=comp regclassname=example.example.comp.RegistrationHandler
create package example.example.comp move the files ExtensionMainImpl.java, RegistrationHandler.classes and RegistrationHandler.java to example.example.comp
change in RegistrationHandler.classes
example.example.comp.ExtensionMainImpl
Unfortunately, I failed to export again.
I noticed the log was output in error log now.
Is something wrong about /build/urd?
okay, then wait for the project maintainer to merge my pull request to get some more info, and a better error message
show me your output bin folder, are here the files in the correct place ? is the file RegistrationHandler.classes also in your bin folder ?
This is bin folder contents generated automatically.
Hello.
My plugin running from Eclipse with LOEclipse properly. But it don't work when installed to LibreOffice,
Sorry but I just can say just above now. Please tell me how to investigate about this. Is any log output by LibreOffice?
==================================== I could install the plugin "oxt" file to LiblreOffice. (not from eclipse) It was indicated on menu on only Culc, (couldn't on Document, Writer) and worked only some function. (due to "Addons.xcu"?)
==================================== I installed ***.oxt in "dist" folder.
When I use "export > LibreOffice package", it occur below error. error: The RegistrationHandler.class is empty. exported .oxt extension will not properly.
==================================== excuse my poor English