protected void addTextSegment(EList<TextSegment> segments, int begin,
int end) {
super.addTextSegment(segments, begin, end);
if(end == getText().length()){
Text lastSegment = (Text) segments.get(segments.size()-1);
String string = lastSegment.getValue().trim();
lastSegment.setValue(string.substring(0, string.length()- 1));
}
}