Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Persisting and restoring editor states
Persisting and restoring editor states [message #397142] Sun, 28 November 2004 12:31
Eclipse UserFriend
I am having problems persisting and restoring the editors in our RCP
application.

I am trying to get the editors in our accounting application to restore when
the workbench is re-opened. When the application is closed, the location of
the file containing the accounting data is saved in the memento for the
navigation view. When the workbench re-opens, the data file is re-opened by
the init() call for the navigation view.

That part works. The problem is with the editors. We have editors that are
editing objects within the data file. The element factory for the editor
must find the object matching the memento data and set that object into the
editor. However, RCP calls the editor factories BEFORE it calls the init()
method for the navigation view. Hence the datastore is not available when
the editors are re-created.

It seems strange to try to restore the editors before calling init() on the
navigation view, as the navigation view can happily exist with no editors
but editors cannot exist with no navigation view. This is causing a major
problem and I do not know how to solve it. I considered storing the memento
and delaying the initialization of the IEditorPart and IEditorInput objects.
However, addPages is called before the navigation init() is called, and
there is no way of adding the pages and displaying their content before the
datastore is opened.

Am I missing something here?

Nigel
Previous Topic:Restricting PlugIns
Next Topic:GEF
Goto Forum:
  


Current Time: Sun Nov 09 12:39:41 EST 2025

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

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

Back to the top