Use TextObjectProvider to get TextObjects.

The Cdt plugin was not updated, fix compile error.