Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Design/Architectual question perspective | views
Design/Architectual question perspective | views [message #1202427] Fri, 22 November 2013 06:21 Go to next message
Jack Kilian is currently offline Jack KilianFriend
Messages: 40
Registered: March 2012
Member
Hi,

what is the best architectual way for the following problem:

I have a persective with e.g. 5 views. Some of that views are used in other perpectives with other views. So - I have a variouse combination of views in perspectives - the idea behind eclipse Wink

When I need data or functions from view A in view B I request the view A in view B with a call like:

IWorkbenchPage pg = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
View_A view_a = (View_A) pg.showView(View_A.ID_VIEW);
...


But then I wire this to views to each other. In an other perspective this view B is available, but not view A. Whats the best way from an archtiectual point of view to avoid this or in other words to decouple the views that the code of each view is more independant from each other?

best regards
jk

[Updated on: Fri, 22 November 2013 06:26]

Report message to a moderator

Re: Design/Architectual question perspective | views [message #1208847 is a reply to message #1202427] Mon, 25 November 2013 07:54 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
On 22.11.13 07:21, Jack Kilian wrote:
> Hi,
>
> what is the best architectual way for the following problem:
>
> I have a persective with e.g. 5 views. Some of that views are used in
> other perpectives with other views. So - I have a variouse combination
> of views in perspectives - the idea behind eclipse ;)
>
> When I need data or functions from view A in view B I request the view A
> in view B with a call like:
>
>
> IWorkbenchPage pg =
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
> View_A view_a = (View_A) pg.showView(View_A.ID_VIEW);
> ..
>
>
> But then I wire this to views to each other. In an other perspective
> this view B is available, but not view A. Whats the best way from an
> archtiectual point of view to avoid this or in other words to decouple
> the views that the code of a view is more independant from each other?
>
> best regards
> jk

Use an event broker == publish/subscribe pattern.

See:
http://tomsondev.bestsolution.at/2011/01/03/enhanced-rcp-how-views-can-communicate/
http://tomsondev.bestsolution.at/2011/02/07/enhanced-rcp-how-views-can-communicate-the-e4-way/

Tom
Re: Design/Architectual question perspective | views [message #1211370 is a reply to message #1208847] Tue, 26 November 2013 11:57 Go to previous messageGo to next message
Jack Kilian is currently offline Jack KilianFriend
Messages: 40
Registered: March 2012
Member
Hi,

ok...but only possible in e4?

My application is based on e3...with e.g. 30 views...I want to remove the depdendencies within this app.

best regards to austria Wink
Re: Design/Architectual question perspective | views [message #1211517 is a reply to message #1211370] Tue, 26 November 2013 13:29 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
No - the first blog shows a pure OSGi-implementation which is available
in fairly any 3.x version as well.

Tom

On 26.11.13 12:57, Jack Kilian wrote:
> Hi,
>
> ok...but only possible in e4?
>
> My application is based on e3...with e.g. 30 views...I want to remove
> the depdendencies within this app.
>
> best regards to austria ;)
Previous Topic:Open-With behaviour
Next Topic:Loading order of model fragments
Goto Forum:
  


Current Time: Sat Apr 20 00:46:10 GMT 2024

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

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

Back to the top