Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Persist selection on tree viewer on restart of application using memento( Persist selection on tree viewer on restart of application using memento)
Persist selection on tree viewer on restart of application using memento [message #1275670] Sun, 23 March 2014 12:13
manu m is currently offline manu mFriend
Messages: 19
Registered: February 2014
Junior Member
I am using memento for persisting views.
I am not able to persist selection on tree viewer I have the following code in save state


IStructuredSelection selection = (IStructuredSelection) viewer.getSelection()
Then I am storing this as selection.toString in memento



While restoring
IMemento storedSelection = memento.getChild("StoredSelection");
viewer.setSelection(new structured selection (selection) );

When setting selection on tree viewer I am getting proper value
but in selection change event it is telling empty selection due to which no selection is retained on tree


I am right now trying for single selection of tree
I would like to do tdo for multiple selections also

Please provide working sample code
Previous Topic:Cross Platfomr Update Site problem
Next Topic:The standard 'Select all' command doesn't work
Goto Forum:
  


Current Time: Wed Apr 24 13:43:48 GMT 2024

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

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

Back to the top