Avoid "might not have been initialized" compiler errors.
Move the generic parameter from type to the method of UndoManagerFactory. Use preserveStyle flag in StyledTextArea constructor.