Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 258321 - Why do Views have to be shared Views ?
Summary: Why do Views have to be shared Views ?
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: navigation (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-10 12:30 EST by Christian Campo CLA
Modified: 2009-01-15 17:39 EST (History)
1 user (show)

See Also:


Attachments
shared view fix (1006 bytes, patch)
2008-12-11 04:36 EST, Holger Hoch CLA
christian.campo: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Campo CLA 2008-12-10 12:30:51 EST
Currently all views that are used in Riena are required to be shared views even if they are only used in one place.

The reason is that we allways supply a secondID when we actually create the view, see:
class SwtViewProvider
	private SwtViewId createAndRegisterSwtViewId(INavigationNode<?> node) {
	....
	swtViewId = new SwtViewId(viewId, getNextSecondaryId(viewId));
	
So views must be shared even so we only use one instance of an RPC View and bind that instance again and again.
Comment 1 Holger Hoch CLA 2008-12-11 04:36:04 EST
hho: I dont't think this is the case ... anyway there is a bug in class SwtViewProvider that makes all views of a type shared views if the first view of that type is shared.
After appliying the attached fix have a look at the "Shared View Demo" module of the "SWT Example Application", subapplication "Playground".
There a 3 views of the same type (ie they use the same navigation node typeId and the same view class).
The first and third submodule use the same instance of that class (= a shared view), the second submodule uses its own instance (see instance counter in the upper left work area)
Comment 2 Holger Hoch CLA 2008-12-11 04:36:58 EST
Created attachment 120166 [details]
shared view fix
Comment 3 Christian Campo CLA 2008-12-11 05:23:32 EST
patch applied