Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to communicate between various views/models
How to communicate between various views/models [message #603319] Sat, 14 November 2009 22:57 Go to next message
Ewan is currently offline EwanFriend
Messages: 5
Registered: July 2009
Junior Member
Hello,

I have really searched through a lot of documentation before posting so any help would be greatly appreciated.

There are two problems that I would like to solve

1) I have created some views in a plugin. However, in all of the examples I can find on the web all of the sample view have a mock data model within the actual view. In my instance I have a model that I would like to share between various views/preferences page. For example - I have a preferences page that I would like to bring up and allow the user to change preferences. Once preferences have been changed the view would change some element of its presentation.

My questions is - what is the eclipse best practice for sharing a single data store/model between a number of views?

Is the best practice to go to the workbench and look up other views by id? This seems a bit nasty as you have the view ids spread throughout the code. I really dont want to use singletons either (IoC fanatic). I have looked at the spring OSGI integration and using spring to inject beans into views. However, it looks massively complex and a bit bleeding edge at the moment and unfortunately I can not justify using it for this simple requirement I have.

2) Second question related to the first. Looking at a lot of the eclipse code it is completely impossible to test/run individual views outside of an eclipse runtime container. When developing with swing/outside of eclipse I prefer to make each view/panel independently runnable. This would be achieved by having a main in each panel which would create a frame, create any mocks that the panel is dependent on, create a frame and add. Is there any way to do this with SWT views that usually run within eclipse. I generally find this very difficult as all of the panels are heavily dependent on the runtime and too much is required to be mocked out.

Any help on either of the questions would be appreciated.

Cheers
Re: How to communicate between various views/models [message #603334 is a reply to message #603319] Sun, 15 November 2009 20:02 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hello Stranger (please enter your name in your newsreader preferences) ,

This is a question for eclipse.platform.rcp. This newsgroup is for questions
related to the Plugin Development Environment. Please post your question
again in the RCP newsgroup.

Best regards,

Wim Jongman



> Hello,
>
> I have really searched through a lot of documentation before posting so any
help would be greatly appreciated.
>
> There are two problems that I would like to solve
>
> 1) I have created some views in a plugin. However, in all of the examples I
can find on the web all of the sample view have a mock data model within the
actual view. In my instance I have a model that I would like to share between
various views/preferences page. For example - I have a preferences page that
I would like to bring up and allow the user to change preferences. Once
preferences have been changed the view would change some element of its
presentation.
>
> My questions is - what is the eclipse best practice for sharing a single
data store/model between a number of views?
>
> Is the best practice to go to the workbench and look up other views by id?
This seems a bit nasty as you have the view ids spread throughout the code. I
really dont want to use singletons either (IoC fanatic). I have looked at the
spring OSGI integration and using spring to inject beans into views. However,
it looks massively complex and a bit bleeding edge at the moment and
unfortunately I can not justify using it for this simple requirement I have.
>
> 2) Second question related to the first. Looking at a lot of the eclipse
code it is completely impossible to test/run individual views outside of an
eclipse runtime container. When developing with swing/outside of eclipse I
prefer to make each view/panel independently runnable. This would be achieved
by having a main in each panel which would create a frame, create any mocks
that the panel is dependent on, create a frame and add. Is there any way to
do this with SWT views that usually run within eclipse. I generally find this
very difficult as all of the panels are heavily dependent on the runtime and
too much is required to be mocked out.
>
> Any help on either of the questions would be appreciated.
>
> Cheers
Previous Topic:How to communicate between various views/models
Next Topic:my Target definition doesn't appear in preferences on workbench restart
Goto Forum:
  


Current Time: Wed Apr 24 14:27:34 GMT 2024

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

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

Back to the top