Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » implement function in my plugin that can be used by other plugins
implement function in my plugin that can be used by other plugins [message #820944] Wed, 14 March 2012 19:21 Go to next message
Mikael Petterson is currently offline Mikael PettersonFriend
Messages: 158
Registered: July 2009
Senior Member
Hi,

I am have a plugin for eclipse that I am maintaining. A user wants a function in my plugin, a listener that can notify about specific operations. Then he want to receive these notifications.

How shall I make it possible for him to get notifications from my plugin to his plugin?

All hints are very welcome.

br,

//mike
Re: implement function in my plugin that can be used by other plugins [message #821312 is a reply to message #820944] Thu, 15 March 2012 07:30 Go to previous message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
Design a ServiceInterface, provide it - maybe - in a separate plugin. Implement a Service that implements your ServiceInterface. Register the service with org.eclipse.ui.services. The user can then request the service
from the Workbench and register his listener.

IMyNotificationService service = PlatformUI.getWorkbench().getService(IMyNotificationService.class)
if (service!=null)
{
   service.addListener(myServiceListener);
}
Previous Topic:Indigo and Maven (m2e) Integration suddenly stopped working
Next Topic:Eclipse Source Builds
Goto Forum:
  


Current Time: Thu Mar 28 16:35:31 GMT 2024

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

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

Back to the top