Skip to main content



      Home
Home » Newcomers » Newcomers » how to get another Plugin's static share object that the plugin class provides
how to get another Plugin's static share object that the plugin class provides [message #202932] Tue, 03 April 2007 02:12 Go to next message
Eclipse UserFriend
Originally posted by: ludinghong1981.163.com

hello everyone !
had built two plugins,A and B. A is loaded as the eclipse startup,and
create a TCP/IP connection.Then In B,I want to use this connection for
communication. how can I do to get the object that generated in plugin A.

I think I should first to get the A's plugin object that defined in A's
plugin class(actually I guess that when eclipse loads A,the static plugin
object was created),but I do not konw how?
anyone can help me ?
Re: how to get another Plugin's static share object that the plugin class provides [message #203114 is a reply to message #202932] Tue, 03 April 2007 23:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

Check your MANIFEST.MF file, and see if you plug-in defines an
activator. If it does, you should be able to communicate using this.

For example, if A defines the activator APlugin, then you should be able
to say APlugin.getDefault() to get the default instance.

cheers,
ian

LU wrote:
> hello everyone !
> had built two plugins,A and B. A is loaded as the eclipse startup,and
> create a TCP/IP connection.Then In B,I want to use this connection for
> communication. how can I do to get the object that generated in plugin A.
>
> I think I should first to get the A's plugin object that defined in A's
> plugin class(actually I guess that when eclipse loads A,the static
> plugin object was created),but I do not konw how?
> anyone can help me ?
>
Re: how to get another Plugin's static share object that the plugin class provides [message #203203 is a reply to message #203114] Wed, 04 April 2007 02:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ludinghong1981.163.com

ok !thanks!
after geting the Aplugin object,then I can get any object that I have
defined in the Aplugin class.is that what you want to tell me?
thank you again!
Re: how to get another Plugin's static share object that the plugin class provides [message #203322 is a reply to message #203203] Wed, 04 April 2007 13:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

Oh, sorry...
No, this is just like any other Java application, it all depends on how
you architect your system. If you have some sort of Object in Plugin A
that you want to share with other plugins, I would probably instantiate
it when Plugin A is loaded, and then hold a reference to this in your
activator.

Then you can say APlugin.getDefault().getMySharedObject(). I sometimes
use the activator to hold a registry of things other plugins may need.

cheers,
ian

LU wrote:
> ok !thanks!
> after geting the Aplugin object,then I can get any object that I have
> defined in the Aplugin class.is that what you want to tell me?
> thank you again!
>
Re: how to get another Plugin's static share object that the plugin class provides [message #203604 is a reply to message #203322] Thu, 05 April 2007 23:00 Go to previous message
Eclipse UserFriend
Originally posted by: ludinghong1981.163.com

thank you !
I got it!
Previous Topic:Setting Editor to read-only
Next Topic:Problem launching eclipse in Linux
Goto Forum:
  


Current Time: Mon Jun 02 03:41:09 EDT 2025

Powered by FUDForum. Page generated in 0.07383 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top