/** @generated */
 @Override
 protected void removeChild(EditPart child) {
   super.removeChild(child);
   if (isActive()) {
     refreshVisibility();
   }
 }
Ejemplo n.º 2
0
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
   installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ShipSmallCargoItemSemanticEditPolicy());
   installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
   installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
   installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ShipSmallCargoCanonicalEditPolicy());
 }
 /** @generated NOT */
 @Override
 public void deactivate() {
   PropertyHolder holder = (PropertyHolder) getNotationView().getElement();
   if (holder != null) {
     holder.eAdapters().remove(PropertyViewUpdater.INSTANCE);
   }
   super.deactivate();
 }
 /** @generated NOT */
 @Override
 public void activate() {
   super.activate();
   PropertyHolder holder = (PropertyHolder) getNotationView().getElement();
   if (holder != null) {
     holder.eAdapters().add(PropertyViewUpdater.INSTANCE);
   }
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE,
       new DataLiteralDataLiteralCompartmentItemSemanticEditPolicy());
   installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
   installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
   installEditPolicy(
       EditPolicyRoles.CANONICAL_ROLE, new DataLiteralDataLiteralCompartmentCanonicalEditPolicy());
 }
 /** @generated */
 protected void handleNotificationEvent(Notification notification) {
   Object feature = notification.getFeature();
   if (NotationPackage.eINSTANCE.getSize_Width().equals(feature)
       || NotationPackage.eINSTANCE.getSize_Height().equals(feature)
       || NotationPackage.eINSTANCE.getLocation_X().equals(feature)
       || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
     refreshBounds();
   }
   super.handleNotificationEvent(notification);
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE,
       new CollectionVariableCollectionVariableAttributeAssignmentsCompartmentItemSemanticEditPolicy());
   installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
   installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
   installEditPolicy(
       EditPolicyRoles.CANONICAL_ROLE,
       new CollectionVariableCollectionVariableAttributeAssignmentsCompartmentCanonicalEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE,
       new EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN());
   installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
   installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
   installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
   // in Papyrus diagrams are not strongly synchronised
   // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN());
   installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); // $NON-NLS-1$
   installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
 }
 /** @generated */
 @Override
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE,
       new ActivityActivityParametersCompartmentItemSemanticEditPolicy());
   installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
   installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
   installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
   // in Papyrus diagrams are not strongly synchronised
   // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityParametersCompartmentCanonicalEditPolicy());
   installEditPolicy(
       EditPolicyRoles.CANONICAL_ROLE,
       new ActivityActivityParametersCompartmentCanonicalEditPolicy());
   installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); // $NON-NLS-1$
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new U2TResizableCompartmentEditPolicy());
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE, new InterfaceOperations2ItemSemanticEditPolicy());
   installEditPolicy(
       EditPolicyRoles.CREATION_ROLE,
       new CreationEditPolicyWithCustomReparent(UMLVisualIDRegistry.TYPED_ADAPTER));
   installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
   installEditPolicy(
       EditPolicyRoles.CANONICAL_ROLE, new InterfaceOperations2CanonicalEditPolicy());
   if (UMLVisualIDRegistry.isShortcutDescendant(getNotationView())) {
     installEditPolicy(
         UpdateDescriptionEditPolicy.ROLE,
         new UpdateDescriptionEditPolicy(UMLDiagramUpdater.TYPED_ADAPTER, false));
   }
 }
  /** @generated NOT */
  protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
    installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EClassAttributes2ItemSemanticEditPolicy());

    // Use a custom Policy to create child elements and initialize their
    // initial position
    installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CompartmentChildCreationEditPolicy());

    installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
    installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new EClassAttributes2CanonicalEditPolicy());

    // Add a policy used to reorder children
    installEditPolicy(
        EditPolicy.LAYOUT_ROLE,
        new ReorderingCompartmentEditPolicy(EcorePackage.Literals.ECLASS__ESTRUCTURAL_FEATURES));
  }
  /** @generated */
  protected void createDefaultEditPolicies() {

    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
    installEditPolicy(
        EditPolicyRoles.SEMANTIC_ROLE,
        new de.uni_mannheim.informatik.swt.models.plm.diagram.edit.policies
            .EntityEntityMethodsCompartment2ItemSemanticEditPolicy());
    installEditPolicy(
        EditPolicyRoles.CREATION_ROLE,
        new CreationEditPolicyWithCustomReparent(
            de.uni_mannheim.informatik.swt.models.plm.diagram.part.PLMVisualIDRegistry
                .TYPED_INSTANCE));
    installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
    installEditPolicy(
        EditPolicyRoles.CANONICAL_ROLE,
        new de.uni_mannheim.informatik.swt.models.plm.diagram.edit.policies
            .EntityEntityMethodsCompartment2CanonicalEditPolicy());
  }
Ejemplo n.º 13
0
 /** @generated */
 protected void setRatio(Double ratio) {
   if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
     super.setRatio(ratio);
   }
 }
 /** @generated */
 @Override
 protected void addChild(EditPart child, int index) {
   super.addChild(child, index);
   refreshVisibility();
 }
 /** @generated */
 protected void refreshVisuals() {
   super.refreshVisuals();
   refreshBounds();
 }