Hi Robert,

Robert Vojta wrote:
Hi,

On Tue, Jun 17, 2008 at 5:05 PM, Juergen Schmidt
<[EMAIL PROTECTED]> wrote:

it's up to you to implement a small protocol handler and do the "real" stuff
on demand. I would decouple the protocol handler from the real functionality
and would create a new service for it. Later on you can instantiate a new
object supporting this service on demand ...
You can provide both implementations (ensure different jars) in the same oxt
file.

I just found some time to test this approach and it works. But I can't
move with one issue - how to work with new service from another Java
extension? To simplify it, let's say that the service is implemented
in one extension and the menu item in another extension in this case.

My new service extension is installed and I can easily work with it
from Basic (createUnoService(), etc.). It works pretty well, I tested
it.

I tried to use my new service from menu item extension (simple
protocol handler with one menu item). To compile this extension, I
have to include <serviceProject>/dist/IDL_types.jar library.
Otherwise, all interfaces / services are unknown and I can't compile
this extension at all. But when I add IDL_types.jar library to the
menu item extension, I can't install menu item extension. Following
exception occurs ...

(com.sun.star.registry.CannotRegisterImplementationException){{Message
= "", Context = (com.sun.star.uno.XInterface) @0 }}

Any idea what's wrong here? If I want to work with my new service from
another extension, should I add some special entry in extension's XML
files? Or should I include more then IDL_types.jar? Or something else?

I tried this with NetBeans integration module version 1.1.2 (current
CVS snapshot).

i think nothing goes wrong. Your second ext depends on the first but we have currently no mechanism to define such dependencies between extensions. It's on our todo list but not yet defined nor implemented. The problem is that the NB plugin doesn't support it as well for the development.

You need the types in ext 2 to compile the source but you don't need them in the oxt because they comes already with ext 1.

Let me think about it how we can address this in the NetBeans plugin. It's missing feature, please submit a RFE

Maybe you can try to make your ext 2 project depending on the ext 1 project. Maybe some customization of the ant build scripts to prevent the packaging of ext1.jar. I haven't tried it and i am only guessing but try it out and we will hopefully find a smoother solution soon


Juergen








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to