Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » 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 #1275669] Sun, 23 March 2014 12:11
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:Help for new guy
Next Topic:How to hide "Set Encoding..." menu
Goto Forum:
  


Current Time: Fri Apr 26 18:32:44 GMT 2024

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

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

Back to the top