void (DNamedElement namedElement) { if (namedElement instanceof DClassElement) { DynamicManager.getInstance(myProject).removeClassElement((DClassElement)namedElement); } else if (namedElement instanceof DItemElement) { DynamicManager.getInstance(myProject).removeItemElement((DItemElement)namedElement); } }