if(elH instanceof IClassHandling<?, ?>) {
IClassHandling<?, ?> clH = (IClassHandling<?, ?>)elH;
if(p instanceof ClassEditPart) {
ClassEditPart classPart = (ClassEditPart)p;
classPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassJavaEditPolicy(clH);
classPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}
else if(p instanceof Class2EditPart) {
Class2EditPart classPart = (Class2EditPart)p;
classPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassJavaEditPolicy(clH);
classPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}
else if(p instanceof Class3EditPart) {
Class3EditPart classPart = (Class3EditPart)p;
classPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassJavaEditPolicy(clH);
classPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}
else if(p instanceof Class4EditPart) {
Class4EditPart classPart = (Class4EditPart)p;
/*
EditPart comment =
factory.createEditPart(
classPart,
UMLElementTypes.Comment_2018
);
*/
classPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassJavaEditPolicy(clH);
classPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}