Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Communication with Eclipse Plugin
Communication with Eclipse Plugin [message #459823] Thu, 07 December 2006 07:15 Go to next message
Eclipse UserFriend
Hi,

i already tested alot of different approaches and i thought it would be a good idea to ask for help here.
I created a RCP Application (App-A) with an editor inside. Now I need to communicate with the RCP Application from another app (App-B), which started the RCP App. Think is, that the App-B started App-B knowing only the startup.jar and instancing the Launcher.Main.
Does anyone have any idea how I could "steer/communicate with" App-A from App-B. I need to set an object which App-A then uses. I already try letting App-B know the jarfile of App-A and using a static method an all, but somehow the RCP Application seems to have a different instance of the static method, maybe cause of eclipse plugin system. I appreciate any help. Basically it's like creating an API in an RCP Application that can be used by other apps. Does anyone have any ideas/solutions for that.
Big thanx

Jan
btw, if I didn't explain everything clearly (I'm german- language barrier) just ask
Re: Communication with Eclipse Plugin [message #459829 is a reply to message #459823] Thu, 07 December 2006 07:57 Go to previous messageGo to next message
Eclipse UserFriend
So, you have 2 different processes. Are they both Java? You might consider something like RMI. If not, you might consider sending socket-socket requests on a protocol that you want to use.

This is how the Java debugging tools work; they fire up a new instance, and then talk via socket communication to find out the current point at debugger, etc.

When your App A starts up, it could create a new ServerSocket(1234), and then when App A starts up RCP App B, it can pass "port 1234" on the command line. Your RCP app can then parse the command line arguments (Platform.getApplicationArguments), and then make a socket communication back to Socket("localhost",1234), and then pass data backwards/forwards. Best to stick to standard Java types, rather than your own objects, for the sake of ClassCast type exceptions.

(If they're both Eclipse applications, it might not make sense to fork a separate Eclipse process; instead, you could have a separate Eclipse window hosting the perspective of your RCP application.)

Hope that helps,

Alex.
Re: Communication with Eclipse Plugin [message #459834 is a reply to message #459823] Thu, 07 December 2006 08:35 Go to previous messageGo to next message
Eclipse UserFriend
Use a socket to communicate between the two apps.

Regards
Stefan

Jan wrote:
> Hi,
>
> i already tested alot of different approaches and i thought it would be a good idea to ask for help here.
> I created a RCP Application (App-A) with an editor inside. Now I need to communicate with the RCP Application from another app (App-B), which started the RCP App. Think is, that the App-B started App-B knowing only the startup.jar and instancing the Launcher.Main.
> Does anyone have any idea how I could "steer/communicate with" App-A from App-B. I need to set an object which App-A then uses. I already try letting App-B know the jarfile of App-A and using a static method an all, but somehow the RCP Application seems to have a different instance of the static method, maybe cause of eclipse plugin system. I appreciate any help. Basically it's like creating an API in an RCP Application that can be used by other apps. Does anyone have any ideas/solutions for that.
> Big thanx
>
> Jan
> btw, if I didn't explain everything clearly (I'm german- language barrier) just ask
Re: Communication with Eclipse Plugin [message #459907 is a reply to message #459823] Fri, 08 December 2006 11:00 Go to previous messageGo to next message
Eclipse UserFriend
I think it might also be worth to consider JMS (ActiveMQ particularly)

see ...
http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg14706.html

* It's fairly easy to adapt; you don't have to mess with socket
connections and threading.
* It's fast too and
* you even can communicate with .NET (and other clients)

Regards
Alexander
Re: Communication with Eclipse Plugin [message #459909 is a reply to message #459907] Fri, 08 December 2006 11:20 Go to previous messageGo to next message
Eclipse UserFriend
But you need a JMS Provider which gives deployments issues.

Regards
Stefan

Alexander Karnstedt wrote:
> I think it might also be worth to consider JMS (ActiveMQ particularly)
>
> see ...
> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg14706.html
>
> * It's fairly easy to adapt; you don't have to mess with socket
> connections and threading.
> * It's fast too and
> * you even can communicate with .NET (and other clients)
>
> Regards
> Alexander
Re: Communication with Eclipse Plugin [message #459917 is a reply to message #459909] Fri, 08 December 2006 12:46 Go to previous message
Eclipse UserFriend
You can run ActiveMQ with the embedded broker inside Eclipse. You don't
need a separate JMS provider. All you have to do is package the ActimeMQ
jar files into a plugin. It's not an big issue, merely a question of
size (+2MB for ActiveMQ)

Stefan Langer schrieb:
> But you need a JMS Provider which gives deployments issues.
>
> Regards
> Stefan
>
> Alexander Karnstedt wrote:
>> I think it might also be worth to consider JMS (ActiveMQ particularly)
>>
>> see ...
>> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg14706.html
>>
>> * It's fairly easy to adapt; you don't have to mess with socket
>> connections and threading.
>> * It's fast too and
>> * you even can communicate with .NET (and other clients)
>>
>> Regards
>> Alexander
Previous Topic:Can anyone tell me the relationship of job and thread?
Next Topic:Platform specific language packs
Goto Forum:
  


Current Time: Mon Apr 14 22:13:38 EDT 2025

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

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

Back to the top