Very new to eclipse plugin development. I have converted jar project into eclipse plugin. But I really dont know, how to make use of it. Some basic doubts,
My idea is something like a plugin to sum two numbers. And user installs the plugin and call add(x,y) method in this plugin. Just like calling a method from an included jar.
There are many tutorials explaining how to create a plugin, but i didn't found how to use the same.
What you are describing is a plain OSGi bundle, with no Eclipse-specific features. In terms of the New Plug-in wizard, yours "doesn't contribute to the UI". Technically, it means that it doesn't need plugin.xml.
The way your outside code perceives the bundle is just as if it was a regular jar: you can access its classes, instantiate them, and call their methods. Or you can call static methods, just like you are used to.
The additional layer provided by OSGi means you can identify which Java packages your bundle exports to its users. Therefore a class which is public, but doesn't reside in an exported package, is not accessible to other bundles (this applies only to the strict mode, however; otherwise you only get an Access Restriction warning).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With