/** {@inheritDoc} */ public void createEditPolicies(EditPart editPart) { editPart.installEditPolicy(NavigationEditPolicy.NAVIGATION_POLICY, new NavigationEditPolicy()); if (editPart instanceof IPrimaryEditPart) { editPart.installEditPolicy(EditPolicyRoles.POPUPBAR_ROLE, new HyperLinkPopupBarEditPolicy()); } if (editPart instanceof NamedElementEditPart) { editPart.installEditPolicy( AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeCompartmentEditPolicy()); } }
public void createEditPolicies(EditPart editPart) { /*install editPolicy to allow modifications of span*/ if (!(editPart instanceof ITextAwareEditPart)) { // DO NOT INSTALL EDIT // POLICIES ON LABELS if (((IGraphicalEditPart) editPart).resolveSemanticElement() instanceof Widget) { editPart.installEditPolicy( AbstractChangeSpanOnSelectionEditPolicy.CHANGE_SPAN_ON_SELECTION_FEEDBACK_ROLE, new ChangeSpanOnSelectionEditPolicy()); } } /* Remove unwanted Editpolicy */ editPart.removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE); editPart.removeEditPolicy(EditPolicyRoles.POPUPBAR_ROLE); }
/** {@inheritDoc} */ public void createEditPolicies(EditPart editPart) { editPart.installEditPolicy(NavigationEditPolicy.NAVIGATION_POLICY, new NavigationEditPolicy()); if (editPart instanceof IPrimaryEditPart) { editPart.installEditPolicy(EditPolicyRoles.POPUPBAR_ROLE, new HyperLinkPopupBarEditPolicy()); } }
/** @param editPart */ public void setEditPart(EditPart editPart) { this.editPart = editPart; editPart.installEditPolicy( EditPolicy.SELECTION_FEEDBACK_ROLE, new FeedbackEditPolicy(this, editPart.getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE))); }