drawing().orphan(getAddedFigure()); }  TextTool.UndoActivity undoActivity = ((TextTool.UndoActivity)getUndoActivity()); if ((undoActivity.getOriginalText() != null) || (getTypingTarget().getText() != null)) {
setUndoActivity(createUndoActivity());
	protected void endEdit() {		if (getTypingTarget() != null) {			if (getFloatingTextField().getText().length() > 0) {				getTypingTarget().setText(getFloatingTextField().getText());			}			else {				drawing().orphan(getAddedFigure());			}			TextTool.UndoActivity undoActivity = ((TextTool.UndoActivity)getUndoActivity());			if ((undoActivity.getOriginalText() != null) || (getTypingTarget().getText() != null)) {				// put created figure into a figure enumeration				getUndoActivity().setAffectedFigures(					new SingleFigureEnumerator(getAddedFigure()));				undoActivity.setBackupText(getTypingTarget().getText());			}			else {				setUndoActivity(null);			}			setTypingTarget(null);			getFloatingTextField().endOverlay();		}	}