WindowState windowState = new WindowState(window);
if (windowState.isEmpty())
return;
WindowId id = WindowIdCreator.createWindowId(window, windowMonitor);
WindowStateAction action = new WindowStateAction(id, windowState, scriptModel, windowMonitor);
if (lastWindowStateAction != null && lastWindowStateAction.equals(action))
recorder.record(new UndoOperation(lastWindowStateAction, scriptModel, windowMonitor).enscript(id));
recorder.record(action.enscript(id));
lastWindowStateAction = action;
}