Esempio n. 1
0
 /* (non-Javadoc)
  * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService#isHandledOperation(java.lang.Object, java.lang.String)
  */
 @Override
 public boolean isHandledOperation(Object context, String operation) {
   return super.isHandledOperation(context, operation)
       || IStepperServiceOperations.CONNECT.equals(operation)
       || IStepperServiceOperations.DISCONNECT.equals(operation)
       || IStepperServiceOperations.CONNECTION_LOST.equals(operation)
       || IStepperServiceOperations.CONNECTION_RECOVERING.equals(operation);
 }
Esempio n. 2
0
  /* (non-Javadoc)
   * @see org.eclipse.tcf.te.runtime.services.interfaces.IStepperService#getStepGroupName(java.lang.Object, java.lang.String)
   */
  @Override
  public String getStepGroupName(Object context, String operation) {
    if (IStepperServiceOperations.CONNECT.equals(operation)) {
      return "Connect " + ((IPeerNode) context).getName(); // $NON-NLS-1$
    }
    if (IStepperServiceOperations.DISCONNECT.equals(operation)) {
      return "Disconnect " + ((IPeerNode) context).getName(); // $NON-NLS-1$
    }
    if (IStepperServiceOperations.CONNECTION_LOST.equals(operation)) {
      return "Lost Connection to " + ((IPeerNode) context).getName(); // $NON-NLS-1$
    }
    if (IStepperServiceOperations.CONNECTION_RECOVERING.equals(operation)) {
      return "Recovering Connection to " + ((IPeerNode) context).getName(); // $NON-NLS-1$
    }

    return super.getStepGroupName(context, operation);
  }
Esempio n. 3
0
  /* (non-Javadoc)
   * @see org.eclipse.tcf.te.runtime.services.interfaces.IStepperService#getStepGroupId(java.lang.Object, java.lang.String)
   */
  @Override
  public String getStepGroupId(Object context, String operation) {
    if (IStepperServiceOperations.CONNECT.equals(operation)) {
      return IStepGroupIds.CONNECT;
    }
    if (IStepperServiceOperations.DISCONNECT.equals(operation)) {
      return IStepGroupIds.DISCONNECT;
    }
    if (IStepperServiceOperations.CONNECTION_LOST.equals(operation)) {
      return IStepGroupIds.CONNECTON_LOST;
    }
    if (IStepperServiceOperations.CONNECTION_RECOVERING.equals(operation)) {
      return IStepGroupIds.CONNECTION_RECOVERING;
    }

    return super.getStepGroupId(context, operation);
  }
Esempio n. 4
0
  /* (non-Javadoc)
   * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService#isEnabled(java.lang.Object, java.lang.String)
   */
  @Override
  public boolean isEnabled(Object context, String operation) {
    if (context instanceof IConnectable) {
      if (IStepperServiceOperations.CONNECT.equals(operation)) {
        return ((IConnectable) context)
            .isConnectStateChangeActionAllowed(IConnectable.ACTION_CONNECT);
      }
      if (IStepperServiceOperations.DISCONNECT.equals(operation)) {
        return ((IConnectable) context)
            .isConnectStateChangeActionAllowed(IConnectable.ACTION_DISCONNECT);
      }
      if (IStepperServiceOperations.CONNECTION_LOST.equals(operation)) {
        return ((IConnectable) context)
            .isConnectStateChangeActionAllowed(IConnectable.STATE_CONNECTION_LOST);
      }
      if (IStepperServiceOperations.CONNECTION_RECOVERING.equals(operation)) {
        return ((IConnectable) context)
            .isConnectStateChangeActionAllowed(IConnectable.STATE_CONNECTION_RECOVERING);
      }
    }

    return super.isEnabled(context, operation);
  }