コード例 #1
0
 /**
  * Is called when the ConnectionEditPart is 'selected'. It then highlights the selected
  * ConnectionEditPart.
  *
  * @see org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy#addSelectionHandles()
  */
 @Override
 protected void addSelectionHandles() {
   if (checkReconnectionFeature()) {
     super.addSelectionHandles();
   }
   showHighlight();
 }
コード例 #2
0
 @Override
 protected void hideSelection() {
   super.hideSelection();
   if (getHost() instanceof IConnectionEditPart) {
     IConnectionEditPart cep = (IConnectionEditPart) getHost();
     cep.forceVisualRefresh();
   }
 }
コード例 #3
0
  /**
   * Is called when the previously 'selected' ConnectionEditPart is 'deselected'. It then disables
   * the highlight of the selected ConnectionEditPart.
   *
   * @see org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy#removeSelectionHandles()
   */
  @Override
  protected void removeSelectionHandles() {
    super.removeSelectionHandles();

    removeHighlight();
  }