public void perform() {
value = null;
disposed = false;
BoxFigure nodeFigure = (BoxFigure) owner.getFigure();
LabelDirectEditManager manager = new LabelDirectEditManager(owner, TextCellEditor.class,
new LabelCellEditorLocator(nodeFigure), nodeFigure){
private boolean committing;
@Override
protected void initCellEditor() {
super.initCellEditor();
Text text = (Text) getCellEditor().getControl();
text.setText(getText());
}
@Override
protected void commit() {
if (committing)
return;
committing = true;
try {
eraseFeedback();
value = (String) getCellEditor().getValue();
} finally {
bringDown();
committing = false;
}
}
@Override
protected void bringDown() {
super.bringDown();
disposed = true;
}
};
manager.show();
}