/**
* @generated
*/
public void relocate(CellEditor celleditor) {
Text text = (Text) celleditor.getControl();
Rectangle rect = getWrapLabel().getTextBounds().getCopy();
getWrapLabel().translateToAbsolute(rect);
if (getWrapLabel().isTextWrapOn()
&& getWrapLabel().getText().length() > 0) {
rect.setSize(new Dimension(text.computeSize(rect.width,
SWT.DEFAULT)));
} else {
int avr = FigureUtilities.getFontMetrics(text.getFont())
.getAverageCharWidth();
rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT,
SWT.DEFAULT)).expand(avr * 2, 0));
}
if (!rect.equals(new Rectangle(text.getBounds()))) {
text.setBounds(rect.x, rect.y, rect.width, rect.height);
}
}