use of org.eclipse.ui.IPersistableElement in project yamcs-studio by yamcs.
the class OPIView method saveState.
@Override
public void saveState(IMemento memento) {
super.saveState(memento);
if (input == null)
return;
IPersistableElement persistable = input.getPersistable();
if (persistable != null) {
/*
* Store IPersistable of the IEditorInput in a separate section since it could potentially use a tag already
* used in the parent memento and thus overwrite data.
*/
IMemento persistableMemento = memento.createChild(TAG_INPUT);
persistable.saveState(persistableMemento);
memento.putString(TAG_FACTORY_ID, persistable.getFactoryId());
// input.getToolTipText());
if (debug)
System.out.println(this + " saved to memento");
}
}
Aggregations