List<IActivityDataObject> toOptimize) {
List<IActivityDataObject> result = new ArrayList<IActivityDataObject>(
toOptimize.size());
TextSelectionActivityDataObject selection = null;
LinkedHashMap<SPathDataObject, ViewportActivityDataObject> viewport = new LinkedHashMap<SPathDataObject, ViewportActivityDataObject>();
for (IActivityDataObject activityDataObject : toOptimize) {
if (activityDataObject instanceof TextEditActivityDataObject) {