public void restoreState(IMemento memento) {
if (memento == null) {
return;
}
// restore the width of the perspective bar
IMemento attributes = memento
.getChild(IWorkbenchConstants.TAG_PERSPECTIVE_BAR);
IMemento size = null;
if (attributes != null) {
size = attributes.getChild(IWorkbenchConstants.TAG_ITEM_SIZE);
}
if (size != null && currentLocation == TOP_RIGHT && topBar != null) {
final Integer x = size.getInteger(IWorkbenchConstants.TAG_X);
StartupThreading.runWithoutExceptions(new StartupRunnable() {
public void runWithException() {
if (x != null) {
topBar.setRightWidth(x.intValue());