// Then we try to install one
if(elH instanceof IPackageHandling) {
if(p instanceof PackageEditPart) {
PackageEditPart packPart = (PackageEditPart)p;
packPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassDiagramJavaEditPolicy();
packPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}
else if(p instanceof Package2EditPart) {
Package2EditPart packPart = (Package2EditPart)p;
packPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassDiagramJavaEditPolicy();
packPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}
else if(p instanceof Package3EditPart) {
Package3EditPart packPart = (Package3EditPart)p;
packPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassDiagramJavaEditPolicy();
packPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}
else if(p instanceof Package4EditPart) {
Package4EditPart packPart = (Package4EditPart)p;
packPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassDiagramJavaEditPolicy();
packPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}
else if(p instanceof Package6EditPart) {
Package6EditPart packPart = (Package6EditPart)p;
packPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassDiagramJavaEditPolicy();
packPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}
else if(p instanceof PackageAsFrameEditPart) {
PackageAsFrameEditPart packPart =
(PackageAsFrameEditPart)p;
packPart.removeEditPolicy(EditPolicyRoles.OPEN_ROLE);
policy = new OpenUMLClassDiagramJavaEditPolicy();
packPart.installEditPolicy(
EditPolicyRoles.OPEN_ROLE,
policy
);
}