/** @generated */ protected void refreshLabel() { EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); if (maskLabelPolicy == null) { maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); } if (maskLabelPolicy == null) { View view = (View) getModel(); if (view.isVisible()) { setLabelTextHelper(getFigure(), getLabelText()); setLabelIconHelper(getFigure(), getLabelIcon()); } else { setLabelTextHelper(getFigure(), ""); // $NON-NLS-1$ setLabelIconHelper(getFigure(), null); } } Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) { ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback(); } Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) { ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback(); } }
@BeforeClass public static void prepareContainerForTest() throws Exception { try { View blockView = ViewUtil.getChildBySemanticHint( getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID); View blockStructureView = ViewUtil.getChildBySemanticHint( blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID); View partView = createGraphicalNode( UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView); containerView = ViewUtil.getChildBySemanticHint( partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID); if (containerView == null) { throw new Exception("Unable to prepare container for test."); } // Ensure the compartment is visible (required for EditPart to be found) if (!containerView.isVisible()) { changeVisibility(containerView); } } catch (Exception e) { throw new Exception("Unable to prepare container for test.", e); } }
@BeforeClass public static void prepareContainerForTest() throws Exception { try { createNodeFromPalette("blockdefinition.tool.interface", getDiagramView(), true); View blockView = ViewUtil.getChildBySemanticHint( getDiagramView(), UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID); containerView = ViewUtil.getChildBySemanticHint( blockView, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID); if (containerView == null) { throw new Exception("Unable to prepare container for test."); } // Ensure the compartment is visible (required for EditPart to be found) if (!containerView.isVisible()) { changeVisibility(containerView); } } catch (Exception e) { throw new Exception("Unable to prepare container for test.", e); } }