Path[] order = modes.getHistory( index );
Map<Path, Location> locations = modes.getProperties( index );
LocationHistory history = dockable.getLocationHistory();
for( Path item : order ){
ExtendedMode mode = getMode( item );
if( mode == null ){
throw new IllegalStateException( "unknown ExtendedMode with id='" + item + "'" );
}
Location location = locations.get( item );
if( location != null ){
history.add( mode, location );
}
}
}
}
}
}
}
// mode settings
for( ExtendedMode mode : getModes() ){
ModeSetting<Location> modeSetting = modes.getSettings( mode.getModeIdentifier() );
if( modeSetting != null ){
getMode( mode ).readSetting( modeSetting );
}
}
}