Q:

Resetting saved states in eclipse rcp

I'm saving some UI settings in a state of my view. In this case I'm saving the current column order of a table in a comma-seperated string.
@Override
public void saveState(final IMemento memento) {
    int[] columnOrder = tableViewer.getTable().getColumnOrder();
    StringBuilder order = new StringBuilder();
    for (int i = 0; i < columnOrder.length; i++) {
        order.append(columnOrder[i]);
        order.append(",");
    }
    IMemento viewMemento = memento.createChild(MyView.ID);
    viewMemento.putString("viewColumnOrder", order.toString());
    super.saveState(memento);
}

Is there a way to reset the state programmatically to the initial value? I tried to reset the perspective, but that didn't work. Also resetting the Workbench did not help me.

A:

There is no API to do this.
On Eclipse 4 starting the RCP with the -clearPersistedState flag should discard the saved state.
On Eclipse 4 the XML version of the IMemento is saved in the view MPart persisted state under the memento key - but this is an internal implementation detail which may change at any time.

