Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Common Navigator: solved issue for not shown content
Common Navigator: solved issue for not shown content [message #458618] Thu, 23 November 2006 11:03 Go to next message
Sebastian Fuchs is currently offline Sebastian FuchsFriend
Messages: 97
Registered: July 2009
Member
hi all,

i must bring this discussion to top again, because I think I have solved
the issue for not showing the navigator content in some cases.

1. we agreed, that one must define its own NavigatorRoot-class to have a
top level type to which can be particular content contributed to by
extension points.

2. we agreed, that one must populate this type in
IAdaptable WorkbenchAdvisor#getDefaultPageInput().
therefor our type must implement IAdaptable.
this makes our class the page input for all pages without a particular
set input (e.g. the common navigator).

up to here this worked fine for some of us (me too) but left others in
the dark because the content still wasn't shown.
it was examined that at this point a persistable mechanism was invoked etc.

after implementing configurer.setSaveAndRestore(true); in
void WorkbenchAdvisor#initialize(IWorkbenchConfigurer)
I got similar issues in my (until now) working CommonNavigator.
content was only shown in a clear workspace.

3. when the workbench states are persisted between user sessions, the
cnf is asked to store its elements in a way, that it can restore its
state next time. that's why it delegates an adapter-query for an
IPersistableElement to our NavagitorRoot. One must implement an
IPersistableElement and make it accessible in
Object getAdapter(Class)
as well as an corresponding IElementFactory for the NavigatorRoot.
Without that, the cnf cannot save its root and - even worse - cannot
restore its root the next time.

I think this is not too difficult to implement, because the
NavigatorRoot is overall just a marking interface and has no internal state.
Detailed informations about the mechanism can be found in the
eclipse-doc and the api-doc of the mentioned classes.

i hope this will help the most of you
sebastian
Re: Common Navigator: solved issue for not shown content [message #460785 is a reply to message #458618] Fri, 29 December 2006 11:57 Go to previous message
Michael Maluck is currently offline Michael MaluckFriend
Messages: 9
Registered: July 2009
Junior Member
On Thu, 23 Nov 2006 12:03:18 +0100, Sebastian Fuchs wrote:

> after implementing configurer.setSaveAndRestore(true); in
> void WorkbenchAdvisor#initialize(IWorkbenchConfigurer)
> I got similar issues in my (until now) working CommonNavigator.
> content was only shown in a clear workspace.
I ran into the same problem. For me there was to need to have CNF use the
default page input and I don't need the platform to persist the displayed
objects. My quick and dirty solution was to derive from CommonNavigator,
override createPartControl and call getCommonViewer().setInput(...).

Michael
Previous Topic:Tray icon for application window
Next Topic:From Table like this thing possibility..
Goto Forum:
  


Current Time: Fri Apr 26 15:33:37 GMT 2024

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

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

Back to the top