Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » What is momento and how to use?
What is momento and how to use? [message #277788] Thu, 16 December 2004 23:47 Go to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Can anyone tell me what a moment is and how to use them?

I have a treeviewer whos state I wish to save, and it looks like momento
is the place to do it. But I am not sure how to go about using the
IMomento which is passed in at save time, nor how to reconstruct my
stuff at load time.

Any examples out there I can take a look at? Thanks!!


--
Respectfully,


CL Gilbert

"Verily, verily, I say unto you, He that entereth not by the door() into
the sheepfold{}, but climbeth up some other *way, the same is a thief
and a robber."

GnuPG Key Fingerprint:
82A6 8893 C2A1 F64E A9AD 19AE 55B2 4CD7 80D2 0A2D

For a free Java interface to Freechess.org see
http://www.rigidsoftware.com/Chess/chess.html
Re: What is momento and how to use? [message #277792 is a reply to message #277788] Fri, 17 December 2004 04:25 Go to previous message
Eclipse UserFriend
> I have a treeviewer whos state I wish to save, and it looks like momento
> is the place to do it. But I am not sure how to go about using the
> IMomento which is passed in at save time, nor how to reconstruct my
> stuff at load time.
IMemento [sic] is a mechanism that the workbench uses to preserve UI state
between user sessions. You get an IMemento passed which encapsulates an xml
file stored by the wb.

There is an example in this article:

http://www.eclipse.org/articles/viewArticle/ViewArticle2.htm l

(search for 'state persistence').

The actual persisted information is in

.... workspace\.metadata\.plugins\org.eclipse.ui.workbench

in the workbench.xml file (sometimes you need to have a look at that for
debugging).

Hope that helps,
Ciao,
Leif


>
> Any examples out there I can take a look at? Thanks!!
>
>
> --
> Respectfully,
>
>
> CL Gilbert
>
> "Verily, verily, I say unto you, He that entereth not by the door() into
> the sheepfold{}, but climbeth up some other *way, the same is a thief
> and a robber."
>
> GnuPG Key Fingerprint:
> 82A6 8893 C2A1 F64E A9AD 19AE 55B2 4CD7 80D2 0A2D
>
> For a free Java interface to Freechess.org see
> http://www.rigidsoftware.com/Chess/chess.html
Previous Topic:Action accelerator
Next Topic:Jump to Matching Bracket
Goto Forum:
  


Current Time: Tue Jul 22 13:59:07 EDT 2025

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

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

Back to the top