how to communicate between two plugins [message #466526] |
Fri, 20 April 2007 08:23  |
Eclipse User |
|
|
|
Originally posted by: johansusai.yahoo.co.in
I have two seperate plugin's say pluginA n pluginB, i want to a
pass a value as argument from pluginA to plugin B.so i exported pluginB as jar and i included that jar in PluginA's manifest file [Build : Extra class path entries], now i found no compilation error.But while exporting it and running the application i am getting error. I think PluginB's method is not resolved at run time.
Kindly help me out to solve this issue.
thanks in Advance.
|
|
|
|
|
|
Re: how to communicate between two plugins [message #466556 is a reply to message #466540] |
Fri, 20 April 2007 16:26   |
Eclipse User |
|
|
|
Originally posted by: rhafernik.site-controls.com
I'm pretty much a newbie, but I think what they're trying to tell you
is "don't do that". The very nature of a "plugin" is that it isn't
dependent on another "plugin" - especially at compile time. If you do
this, you've made it so that both plugins must be loaded if one ever is
and that's probably going to cause trouble down the way.
If the two plugins are so tightly coupled that one must call the
methods of the other, maybe they can be merged into one plugin?
Or, could you split some of your code off into a jar that is loaded by
both plugins?
As I said, I'm just a newbie, but cross-plugin dependencies seem like
the very sort of thing Eclipse was invented to prevent.
~rob
On 2007-04-20 09:03:28 -0500, Stefan Langer <mailtolanger@googlemail.com> said:
> What Neil is trying to tell you is that you have not understood the
> plugin mechanism from OSGI and ECLIPSE. So the first thing you need to
> do is read up on your OSGI, Eclipse skills and then come back if you
> still have no understood the problem you are having.
>
> Good starting points are:
>
> http://www.eclipse.org/resources/ - Provides a list of resources for
> eclipse development
> http://wiki.eclipse.org/index.php/Main_Page - Eclipse wiki especially
> look at the Official Eclipse FAQ.
>
> Regards
> Stefan
>
> Johanantonysusai schrieb:
>> Neil,
>>
>> Thanks for your suggestion. kindly help me how to access methods in a
>> class of one plugin from different plugin.
>> Thanks,
>> Johan
|
|
|
Re: how to communicate between two plugins [message #466560 is a reply to message #466556] |
Fri, 20 April 2007 16:56   |
Eclipse User |
|
|
|
While I agree that it's a good idea to keep plug-ins as independent as
possible, it's also very common to refer to classes/interfaces in other
plug-ins. Plug-ins often consist of a publicly accessible API and an
internal implementation (in Eclipse, these packages contain the "internal"
keyword).
To Johanantonysusai, I also, second the suggestion that you do some
reading on OSGi and plug-in dependencies. The short answer, though, is:
* In the manifest for plug-in B, go to the Runtime tab and export the
packages that you want to make visible to other plug-ins.
* In the manifest for plug-in A, go to the Dependencies tab and add a
dependency on Plug-in B.
You should now be able to reference plug-in B classes in plug-in A.
--- Patrick
patrick@rcpquickstart.com
Rob Hafernik wrote:
> I'm pretty much a newbie, but I think what they're trying to tell you
> is "don't do that". The very nature of a "plugin" is that it isn't
> dependent on another "plugin" - especially at compile time. If you do
> this, you've made it so that both plugins must be loaded if one ever is
> and that's probably going to cause trouble down the way.
> If the two plugins are so tightly coupled that one must call the
> methods of the other, maybe they can be merged into one plugin?
> Or, could you split some of your code off into a jar that is loaded by
> both plugins?
> As I said, I'm just a newbie, but cross-plugin dependencies seem like
> the very sort of thing Eclipse was invented to prevent.
> ~rob
> On 2007-04-20 09:03:28 -0500, Stefan Langer <mailtolanger@googlemail.com>
said:
>> What Neil is trying to tell you is that you have not understood the
>> plugin mechanism from OSGI and ECLIPSE. So the first thing you need to
>> do is read up on your OSGI, Eclipse skills and then come back if you
>> still have no understood the problem you are having.
>>
>> Good starting points are:
>>
>> http://www.eclipse.org/resources/ - Provides a list of resources for
>> eclipse development
>> http://wiki.eclipse.org/index.php/Main_Page - Eclipse wiki especially
>> look at the Official Eclipse FAQ.
>>
>> Regards
>> Stefan
>>
>> Johanantonysusai schrieb:
>>> Neil,
>>>
>>> Thanks for your suggestion. kindly help me how to access methods in a
>>> class of one plugin from different plugin.
>>> Thanks,
>>> Johan
|
|
|
|
Powered by
FUDForum. Page generated in 0.03797 seconds