/** UML elements modifications listeners initialization */
protected void initListeners() {
EditPart p = getDiagramEditPart();
if((p!=null)&&(p instanceof IGraphicalEditPart)) {
IGraphicalEditPart g = (IGraphicalEditPart)p;
editingDomain = g.getEditingDomain();
Diagram d = null;
Object m = g.getModel();
String name = null;
if((m!=null)&&(m instanceof Diagram)) {
d = (Diagram)m;
EObject eo = d.getElement();
if(eo instanceof Package) {
name =
PackageHandler.buildFullyQualifiedName(
(Package)eo
);
}
else if(eo instanceof Class) {
Class cl = (Class)eo;
name =
ClassHandler.buildFullyQualifiedName(
cl
);
}
if(name!=null) {
TransactionalEditingDomain domain =
g.getEditingDomain();
if(listeners.get(name)==null) {
IElementHandling elH = findHandler(g);
if(elH!=null) {
domain.addResourceSetListener(elH);
listeners.put(name, elH);