}
@Override
public void deactivate() {
if (isActive()) {
ContextButtonManager contextButtonManager = getConfigurationManager().getDiagramEditor().getContextButtonManager();
contextButtonManager.deRegister(this);
getCastedModel().removePropertyChangeListener(this);
ShapePresentation shapePresentation = getCastedModel().getShapePresentation();
shapePresentation.dispose();
super.deactivate();
}