Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » MVC pattern Plugin approach
MVC pattern Plugin approach [message #305119] Fri, 23 June 2006 05:52 Go to next message
Eclipse UserFriend
Originally posted by: dave.dave.com

Hi

I have a editor plugin that uses a datastructure and I want to be able to
access that datastructure in another view plugin. How do I access that data
structure in the editor plugin from another plugin ? Can anyone give me an
insight into the plugin interactions. Do I use selectionListener or
something similar ?

Thanks, Dave
Re: MVC pattern Plugin approach [message #305166 is a reply to message #305119] Sun, 25 June 2006 15:16 Go to previous message
Jeffery Caldwell is currently offline Jeffery CaldwellFriend
Messages: 5
Registered: July 2009
Junior Member
I would first suggest reading this article:
http://www-128.ibm.com/developerworks/library/os-ecllink/ind ex.html

It demonstrates at least three different approaches to answering your
question of linking the editor and the view. I think it kind of
glosses over the IAdaptable stuff, and when I was first getting into
that was really confusing.

For instance in the rcpnews application the plug-in activator class
registers several of the classes from the data model with the
platform:
public void start(BundleContext context) throws Exception {
super.start(context);
Platform.getAdapterManager().registerAdapters(new
RCPNewsUIAdapterFactory(), IFeedStore.class);
Platform.getAdapterManager().registerAdapters(new
RCPNewsUIAdapterFactory(), IFeed.class);
Platform.getAdapterManager().registerAdapters(new
RCPNewsUIAdapterFactory(), IFeedEntry.class);
}

Then the RCPNewsUIAdapterFactory class can adapt the model objects as
needed based on what class is asking for an adaptation of your model
class.

On Fri, 23 Jun 2006 15:52:07 +1000, "David" <dave@dave.com> wrote:

>Hi
>
>I have a editor plugin that uses a datastructure and I want to be able to
>access that datastructure in another view plugin. How do I access that data
>structure in the editor plugin from another plugin ? Can anyone give me an
>insight into the plugin interactions. Do I use selectionListener or
>something similar ?
>
>Thanks, Dave
>
Previous Topic:controling newWizard menu positioning
Next Topic:Re: Update manager not working on SUSE Linux 10.1
Goto Forum:
  


Current Time: Mon Dec 22 02:56:56 GMT 2014

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

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